1
This commit is contained in:
@@ -5,23 +5,14 @@
|
||||
}
|
||||
|
||||
<h3>
|
||||
Forgot your password?
|
||||
忘记密码?
|
||||
</h3>
|
||||
|
||||
<p>Enter your email.</p>
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form method="post">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger" role="alert"></div>
|
||||
<div class="form-floating mb-3">
|
||||
<input asp-for="Input.Email" class="form-control" autocomplete="username" aria-required="true" placeholder="name@example.com" />
|
||||
<label asp-for="Input.Email" class="form-label"></label>
|
||||
<span asp-validation-for="Input.Email" class="text-danger"></span>
|
||||
</div>
|
||||
<button type="submit" class="w-100 btn btn-lg btn-primary">Reset Password</button>
|
||||
</form>
|
||||
请联系系统管理员为您重置您的密码。
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}
|
||||
|
||||
<h3>
|
||||
Locked out
|
||||
登出
|
||||
</h3>
|
||||
|
||||
<p>This account has been locked out, please try again later.</p>
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null.");
|
||||
}
|
||||
|
||||
<style>
|
||||
#forgot-password {
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8 col-lg-4">
|
||||
<section>
|
||||
@@ -24,7 +30,7 @@
|
||||
<div class="checkbox mb-3">
|
||||
<label asp-for="Input.RememberMe" class="form-label">
|
||||
<input class="form-check-input" asp-for="Input.RememberMe" />
|
||||
@Html.DisplayNameFor(m => m.Input.RememberMe)
|
||||
记住账号
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
@@ -32,7 +38,7 @@
|
||||
<br />
|
||||
</div>
|
||||
<div>
|
||||
<p>
|
||||
<p style="margin-top:5px;">
|
||||
<a id="forgot-password" asp-page="./ForgotPassword">忘记密码?</a>
|
||||
<br />
|
||||
<br />
|
||||
@@ -40,40 +46,6 @@
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<section>
|
||||
@{
|
||||
if ((Model.ExternalLogins?.Count ?? 0) > 0)
|
||||
{
|
||||
<form id="external-account" asp-page="./ExternalLogin" asp-route-returnUrl="@UrlEncoder.Default.Encode(Model.ReturnUrl)" method="post" class="form-horizontal">
|
||||
<div>
|
||||
<p>
|
||||
@foreach (var provider in Model.ExternalLogins!)
|
||||
{
|
||||
if (provider.Name == "Google")
|
||||
{
|
||||
<button type="submit" class="btn w-100 mb-3 d-flex align-items-center" name="provider" value="@provider.Name" title="Log in using your Google account">
|
||||
<img src="@GlobalConfiguration.BasePath/images/external/google-signin.svg" alt="Google" class="me-2" />
|
||||
</button>
|
||||
}
|
||||
else if (provider.Name == "Microsoft")
|
||||
{
|
||||
<button type="submit" class="btn w-100 mb-3 d-flex align-items-center" name="provider" value="@provider.Name" title="Log in using your Microsoft account">
|
||||
<img src="@GlobalConfiguration.BasePath/images/external/microsoft-signin.svg" alt="Microsoft" class="me-2" />
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button type="submit" class="btn btn-primary w-100 mb-3" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account">
|
||||
@provider.DisplayName
|
||||
</button>
|
||||
}
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
}
|
||||
}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
}
|
||||
|
||||
<h3>
|
||||
Logout
|
||||
退出
|
||||
</h3>
|
||||
|
||||
<p>
|
||||
Logging out will make sure that others cant use this session to make changes to the wiki. You'll need to log back in before making changes.<br /><br />
|
||||
退出登录前确保其他人没有在使用当前会话,退出后您需要重新登录<br /><br />
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
if (User.Identity?.IsAuthenticated ?? false)
|
||||
{
|
||||
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/", new { area = "" })" method="post">
|
||||
<button type="submit" class="btn btn-primary rounded-0">Logout</button>
|
||||
<button type="submit" class="btn btn-primary rounded-0">退出</button>
|
||||
</form>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>You have successfully logged out of the application.</p>
|
||||
<p>操作成功</p>
|
||||
}
|
||||
}
|
||||
</header>
|
||||
|
||||
@@ -13,21 +13,21 @@
|
||||
<form id="change-password-form" method="post">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger" role="alert"></div>
|
||||
<div class="form-floating mb-3">
|
||||
<input asp-for="Input.OldPassword" class="form-control" autocomplete="current-password" aria-required="true" placeholder="Please enter your old password." />
|
||||
<label asp-for="Input.OldPassword" class="form-label"></label>
|
||||
<input asp-for="Input.OldPassword" class="form-control" autocomplete="current-password" aria-required="true" placeholder="请输入旧密码." />
|
||||
<label asp-for="Input.OldPassword" class="form-label">旧密码</label>
|
||||
<span asp-validation-for="Input.OldPassword" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input asp-for="Input.NewPassword" class="form-control" autocomplete="new-password" aria-required="true" placeholder="Please enter your new password." />
|
||||
<label asp-for="Input.NewPassword" class="form-label"></label>
|
||||
<input asp-for="Input.NewPassword" class="form-control" autocomplete="new-password" aria-required="true" placeholder="请输入新密码." />
|
||||
<label asp-for="Input.NewPassword" class="form-label">新密码</label>
|
||||
<span asp-validation-for="Input.NewPassword" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input asp-for="Input.ConfirmPassword" class="form-control" autocomplete="new-password" aria-required="true" placeholder="Please confirm your new password."/>
|
||||
<label asp-for="Input.ConfirmPassword" class="form-label"></label>
|
||||
<input asp-for="Input.ConfirmPassword" class="form-control" autocomplete="new-password" aria-required="true" placeholder="请再次输入新密码."/>
|
||||
<label asp-for="Input.ConfirmPassword" class="form-label">请再次输入新密码</label>
|
||||
<span asp-validation-for="Input.ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
<button type="submit" class="w-100 btn btn-lg btn-primary">Update password</button>
|
||||
<button type="submit" class="w-100 btn btn-lg btn-primary">确认修改</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TightWiki.Areas.Identity.Pages.Account.Manage
|
||||
{
|
||||
public IActionResult OnGetAsync()
|
||||
{
|
||||
return Redirect($"{GlobalConfiguration.BasePath}/Identity/Account/Manage/Email");
|
||||
return Redirect($"{GlobalConfiguration.BasePath}/Identity/Account/Manage/ChangePassword");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
@inject SignInManager<IdentityUser> SignInManager
|
||||
@{
|
||||
var hasExternalLogins = (await SignInManager.GetExternalAuthenticationSchemesAsync()).Any();
|
||||
var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null.");
|
||||
}
|
||||
<ul class="nav nav-pills flex-column">
|
||||
<li class="nav-item"><a class="nav-link @ManageNavPages.EmailNavClass(ViewContext)" id="email" asp-page="./Email">Email</a></li>
|
||||
<li class="nav-item"><a class="nav-link @ManageNavPages.ChangePasswordNavClass(ViewContext)" id="change-password" asp-page="./ChangePassword">Password</a></li>
|
||||
@if (hasExternalLogins)
|
||||
{
|
||||
<li id="external-logins" class="nav-item"><a id="external-login" class="nav-link @ManageNavPages.ExternalLoginsNavClass(ViewContext)" asp-page="./ExternalLogins">External logins</a></li>
|
||||
}
|
||||
<li class="nav-item"><a class="nav-link @ManageNavPages.TwoFactorAuthenticationNavClass(ViewContext)" id="two-factor" asp-page="./TwoFactorAuthentication">Two-factor authentication</a></li>
|
||||
<li class="nav-item"><a class="nav-link @ManageNavPages.ChangePasswordNavClass(ViewContext)" id="change-password" asp-page="./ChangePassword">ÐÞ¸ÄÃÜÂë</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user