initial commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
@page "/admin/login"
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
<PageTitle>管理登录</PageTitle>
|
||||
|
||||
<section class="admin-login-page">
|
||||
<MudPaper Class="admin-login-panel" Elevation="0">
|
||||
<MudText Typo="Typo.h4">管理登录</MudText>
|
||||
<MudText Color="Color.Secondary">输入管理员密码后可以维护歌单和标签。</MudText>
|
||||
|
||||
@if (Error == "1")
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Variant="Variant.Outlined">密码不正确。</MudAlert>
|
||||
}
|
||||
|
||||
<form method="post" action="/admin/sign-in" class="native-form">
|
||||
<input type="hidden" name="returnUrl" value="@ResolvedReturnUrl" />
|
||||
<label class="native-field">
|
||||
<span>管理员密码</span>
|
||||
<input type="password" name="password" required autocomplete="current-password" />
|
||||
</label>
|
||||
<MudButton ButtonType="ButtonType.Submit"
|
||||
Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.Login"
|
||||
FullWidth="true">
|
||||
登录
|
||||
</MudButton>
|
||||
</form>
|
||||
</MudPaper>
|
||||
</section>
|
||||
|
||||
@code {
|
||||
[SupplyParameterFromQuery(Name = "error")]
|
||||
public string? Error { get; set; }
|
||||
|
||||
[SupplyParameterFromQuery(Name = "returnUrl")]
|
||||
public string? ReturnUrl { get; set; }
|
||||
|
||||
private string ResolvedReturnUrl => string.IsNullOrWhiteSpace(ReturnUrl) ? "/admin" : ReturnUrl;
|
||||
}
|
||||
Reference in New Issue
Block a user