-
Usuario
-
-
+
@code {
Login loginModel = new Login();
@@ -88,10 +134,15 @@
ResetPassword resetPassword = new ResetPassword();
public bool isSecret = false;
bool codeTwoFactor = false;
+ bool isSubmitting = false;
string OTPCode = string.Empty;
private async Task LoginAsync()
{
+ if (isSubmitting) return;
+ isSubmitting = true;
+ try
+ {
if (codeTwoFactor && login2FAModel.Code.Length > 4)
{
string requestUrl = $"api/Authentication/login-2FA?code={login2FAModel.Code}&username={login2FAModel.UserName}";
@@ -136,9 +187,18 @@
toastService.ShowError(tokenResponse);
}
}
+ }
+ finally
+ {
+ isSubmitting = false;
+ }
}
private async Task ResetPasswordAsync()
{
+ if (isSubmitting) return;
+ isSubmitting = true;
+ try
+ {
if (resetPassword.Password != resetPassword.ConfirmPassword)
{
toastService.ShowError("Las contraseñas no coinciden. ¡Inténtalo de nuevo!");
@@ -151,6 +211,11 @@
{
await ResetingPassword();
}
+ }
+ finally
+ {
+ isSubmitting = false;
+ }
}
private async Task ResetingPassword()
{
diff --git a/phronCare.UIBlazor/Pages/Authorization/LoginPage.razor.css b/phronCare.UIBlazor/Pages/Authorization/LoginPage.razor.css
index 1c204f1..77674b3 100644
--- a/phronCare.UIBlazor/Pages/Authorization/LoginPage.razor.css
+++ b/phronCare.UIBlazor/Pages/Authorization/LoginPage.razor.css
@@ -1,9 +1,43 @@
-.btn-circle {
- width: 40px;
- height: 40px;
- padding: 6px 0px;
- border-radius: 50px;
- text-align: center;
- font-size: 20px;
- line-height: 1.42857;
+.login-shell { display: grid; min-height: calc(100vh - 3rem); grid-template-columns: minmax(360px, .9fr) minmax(430px, 1.1fr); overflow: hidden; background: var(--ph-surface); border: 1px solid var(--ph-border); border-radius: 1.25rem; box-shadow: var(--ph-shadow-md); }
+.login-showcase { position: relative; display: flex; min-height: 650px; flex-direction: column; justify-content: space-between; padding: 2.25rem; overflow: hidden; color: #fff; background: radial-gradient(circle at 85% 15%, rgba(83, 199, 184, .28), transparent 32%), linear-gradient(145deg, #263b70 0%, #1b2a50 52%, #15213e 100%); }
+.login-showcase::before, .login-showcase::after { position: absolute; content: ""; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
+.login-showcase::before { right: -12rem; bottom: -12rem; width: 30rem; height: 30rem; }
+.login-showcase::after { right: -5rem; bottom: -5rem; width: 18rem; height: 18rem; }
+.showcase-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: .75rem; font-size: 1.35rem; }
+.showcase-brand img { width: 46px; height: 46px; object-fit: contain; border-radius: .75rem; }
+.showcase-brand .brand-copy, .mobile-brand .brand-copy { display: flex; flex-direction: column; line-height: 1; }
+.showcase-brand .brand-name, .mobile-brand .brand-name { display: inline-block; white-space: nowrap; }
+.showcase-brand small, .mobile-brand small { margin-top: .3rem; color: rgba(232,239,251,.66); font-size: .58rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
+.showcase-copy { position: relative; z-index: 1; max-width: 32rem; }
+.showcase-eyebrow, .login-eyebrow { display: block; margin-bottom: .7rem; color: #72d6ca; font-size: .72rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
+.showcase-copy h1 { margin: 0; color: #fff; font-size: clamp(2rem, 3.2vw, 3.15rem); font-weight: 720; line-height: 1.08; }
+.showcase-copy p { max-width: 28rem; margin: 1.15rem 0 0; color: rgba(232,239,251,.72); font-size: 1rem; line-height: 1.65; }
+.showcase-footer { position: relative; z-index: 1; display: flex; align-items: center; gap: .55rem; color: rgba(232,239,251,.68); font-size: .75rem; }
+.login-panel { display: flex; align-items: center; justify-content: center; padding: clamp(2rem, 5vw, 5rem); background: var(--ph-surface); }
+.login-card { width: 100%; max-width: 430px; }
+.mobile-brand { display: none; }
+.login-heading { margin-bottom: 1.75rem; }
+.login-heading h2 { margin: 0; color: var(--ph-text); font-size: 1.85rem; font-weight: 750; }
+.login-heading p { margin: .55rem 0 0; color: var(--ph-text-muted); font-size: .92rem; }
+.login-eyebrow { color: var(--ph-primary); }
+.form-group { margin-bottom: 1rem; }
+.input-with-icon { position: relative; }
+.input-with-icon > i { position: absolute; top: 50%; left: .95rem; z-index: 1; color: var(--ph-text-muted); font-size: .85rem; transform: translateY(-50%); pointer-events: none; }
+.input-with-icon ::deep .form-control { padding-left: 2.65rem; }
+.field-hint { display: block; margin-top: .4rem; color: var(--ph-text-muted); font-size: .75rem; }
+.login-submit { display: flex; width: 100%; min-height: 2.85rem; align-items: center; justify-content: center; gap: .55rem; margin-top: 1.35rem; }
+.login-help { display: flex; align-items: center; justify-content: center; gap: .35rem; margin-top: 1.2rem; color: var(--ph-text-muted); font-size: .78rem; text-align: center; }
+.reset-link { padding: .2rem; color: var(--ph-primary); background: transparent; border: 0; font: inherit; font-weight: 650; cursor: pointer; }
+.reset-link:hover { text-decoration: underline; }
+.reset-link:focus-visible { outline: 3px solid var(--ph-focus); border-radius: .25rem; }
+.login-legal { margin-top: 2rem; color: var(--ph-text-muted); font-size: .7rem; text-align: center; }
+@media (max-width: 991.98px) { .login-shell { grid-template-columns: minmax(300px, .75fr) minmax(400px, 1.25fr); } .login-showcase { padding: 1.75rem; } }
+@media (max-width: 767.98px) {
+ .login-shell { display: block; min-height: auto; border: 0; border-radius: 0; box-shadow: none; }
+ .login-showcase { display: none; }
+ .login-panel { min-height: calc(100vh - 2rem); align-items: flex-start; padding: 1.5rem 1rem 2rem; }
+ .mobile-brand { display: flex; align-items: center; gap: .65rem; margin-bottom: 2.5rem; color: var(--ph-text); font-size: 1.2rem; }
+ .mobile-brand img { width: 42px; height: 42px; object-fit: contain; border-radius: .65rem; }
+ .mobile-brand small { color: var(--ph-text-muted); }
+ .login-heading h2 { font-size: 1.6rem; }
}
diff --git a/phronCare.UIBlazor/Pages/Index.razor b/phronCare.UIBlazor/Pages/Index.razor
index 26b3f74..e067baf 100644
--- a/phronCare.UIBlazor/Pages/Index.razor
+++ b/phronCare.UIBlazor/Pages/Index.razor
@@ -2,92 +2,120 @@
@using phronCare.UIBlazor.Pages.Authorization
@inject NavigationManager Navigation
-
PhronCare
+
PhronCare · SaludLAB
-
-
+
+
-
-
-
- @foreach (var item in QuickAccessItems)
- {
- NavigateTo(item.Url)">
-
-
-
-
- @item.Title
- @item.Description
-
-
-
- }
-
-
-
-