Browse Source
Merge pull request #1233 from colinin/perf-login-register-view
perf(account): Optimize the unregistered/logged-in prompt
pull/1238/head
yx lin
9 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
12 additions and
11 deletions
-
aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/Login.cshtml
-
aspnet-core/modules/account/LINGYUN.Abp.Account.Web/Pages/Account/Register.cshtml
|
|
|
@ -25,13 +25,6 @@ |
|
|
|
<div class="card mt-3 shadow-sm rounded"> |
|
|
|
<div class="card-body p-5"> |
|
|
|
<h4>@L["Login"]</h4> |
|
|
|
@if (await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled)) |
|
|
|
{ |
|
|
|
<strong> |
|
|
|
@L["AreYouANewUser"] |
|
|
|
<a href="@Url.Page("./Register", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})" class="text-decoration-none">@L["Register"]</a> |
|
|
|
</strong> |
|
|
|
} |
|
|
|
@if (Model.EnableLocalLogin) |
|
|
|
{ |
|
|
|
<form method="post" class="mt-4"> |
|
|
|
@ -57,6 +50,13 @@ |
|
|
|
<a href="@Url.Page("./ForgotPassword", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["ForgotPassword"]</a> |
|
|
|
</abp-column> |
|
|
|
</abp-row> |
|
|
|
@if (await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled)) |
|
|
|
{ |
|
|
|
<strong> |
|
|
|
@L["AreYouANewUser"] |
|
|
|
<a href="@Url.Page("./Register", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})" class="text-decoration-none">@L["Register"]</a> |
|
|
|
</strong> |
|
|
|
} |
|
|
|
<div class="d-grid gap-2"> |
|
|
|
<abp-button type="submit" button-type="Primary" name="Action" value="Login" class="btn-lg mt-3">@L["Login"]</abp-button> |
|
|
|
@if (Model.ShowCancelButton) |
|
|
|
|
|
|
|
@ -7,10 +7,6 @@ |
|
|
|
<div class="card mt-3 shadow-sm rounded"> |
|
|
|
<div class="card-body p-5"> |
|
|
|
<h4>@L["Register"]</h4> |
|
|
|
<strong> |
|
|
|
@L["AlreadyRegistered"] |
|
|
|
<a href="@Url.Page("./Login", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})" class="text-decoration-none">@L["Login"]</a> |
|
|
|
</strong> |
|
|
|
<form method="post" class="mt-4"> |
|
|
|
@if (Model.EnableLocalRegister || Model.IsExternalLogin) |
|
|
|
{ |
|
|
|
@ -27,6 +23,11 @@ |
|
|
|
<abp-input asp-for="Input.Password" /> |
|
|
|
} |
|
|
|
|
|
|
|
<strong> |
|
|
|
@L["AlreadyRegistered"] |
|
|
|
<a href="@Url.Page("./Login", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})" class="text-decoration-none">@L["Login"]</a> |
|
|
|
</strong> |
|
|
|
|
|
|
|
@if (Model.EnableLocalRegister || Model.IsExternalLogin) |
|
|
|
{ |
|
|
|
<div class="d-grid gap-2"> |
|
|
|
|