This commit is contained in:
zel
2025-02-07 16:16:10 +08:00
parent 83aade6ac7
commit e38d4d76a2
24 changed files with 119 additions and 159 deletions

View File

@@ -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>