feat: 登录首页增加切换功能
This commit is contained in:
parent
84422250c6
commit
955f65a7aa
|
@ -1,4 +1,4 @@
|
||||||
<div class="wrap">
|
<div class="wrap white">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form method="post" class="form-signin" action="@PostUrl" @ref="LoginForm">
|
<form method="post" class="form-signin" action="@PostUrl" @ref="LoginForm">
|
||||||
<h2 class="form-signin-heading">@Title</h2>
|
<h2 class="form-signin-heading">@Title</h2>
|
||||||
|
|
|
@ -18,3 +18,7 @@ li {
|
||||||
li:not(:last-child) {
|
li:not(:last-child) {
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.white + .login-footer li a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
|
@ -31,6 +31,13 @@ public class Login : ComponentBase
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string? AppId { get; set; }
|
public string? AppId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
[SupplyParameterFromQuery]
|
||||||
|
[Parameter]
|
||||||
|
public string? View { get; set; }
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
[NotNull]
|
[NotNull]
|
||||||
private IDict? DictsService { get; set; }
|
private IDict? DictsService { get; set; }
|
||||||
|
@ -41,7 +48,11 @@ public class Login : ComponentBase
|
||||||
/// <param name="builder"></param>
|
/// <param name="builder"></param>
|
||||||
protected override void BuildRenderTree(RenderTreeBuilder builder)
|
protected override void BuildRenderTree(RenderTreeBuilder builder)
|
||||||
{
|
{
|
||||||
var view = LoginHelper.GetCurrentLoginTheme(DictsService.GetCurrentLogin());
|
if (!string.IsNullOrEmpty(View))
|
||||||
|
{
|
||||||
|
View = $"0-{View}";
|
||||||
|
}
|
||||||
|
var view = LoginHelper.GetCurrentLoginTheme(View ?? DictsService.GetCurrentLogin());
|
||||||
var componentType = view switch
|
var componentType = view switch
|
||||||
{
|
{
|
||||||
"gitee" => typeof(AdminLoginGitee),
|
"gitee" => typeof(AdminLoginGitee),
|
||||||
|
|
Loading…
Reference in New Issue