Fixed 2FA and login pages.

This commit is contained in:
Nick Beckley 2026-06-26 19:47:25 +01:00
parent 44d7253367
commit 393fa884ca
5 changed files with 116 additions and 13 deletions

View File

@ -278,7 +278,7 @@ public sealed class AccountController(IAuthService authService) : Controller
return LocalRedirect(model.ReturnUrl);
}
return RedirectToAction("Index", "Home");
return RedirectToAction("Index", "Projects");
}
[HttpGet]
@ -323,6 +323,6 @@ public sealed class AccountController(IAuthService authService) : Controller
return LocalRedirect(model.ReturnUrl);
}
return RedirectToAction("Index", "Home");
return RedirectToAction("Index", "Projects");
}
}

View File

@ -64,7 +64,7 @@
}
else
{
<div class="page-heading compact">
<div class="page-heading compact auth-page-heading">
<div>
<p class="eyebrow">Account</p>
<h1>Login</h1>
@ -77,24 +77,24 @@ else
<div class="alert alert-info">@authMessage</div>
}
<section class="edit-panel">
<form asp-action="Login" method="post" class="asset-create-form">
<section class="edit-panel auth-card">
<form asp-action="Login" method="post" class="asset-create-form auth-form">
<input asp-for="ReturnUrl" type="hidden" />
<input asp-for="IsCompanionLogin" type="hidden" />
<div asp-validation-summary="ModelOnly" class="alert alert-warning"></div>
<div class="row g-3">
<div class="col-md-6">
<div class="auth-field-stack">
<div>
<label class="form-label" asp-for="Email">Email address</label>
<input class="form-control" asp-for="Email" autocomplete="email" />
<span class="text-danger" asp-validation-for="Email"></span>
</div>
<div class="col-md-6">
<div>
<label class="form-label" asp-for="Password">Password</label>
<input class="form-control" asp-for="Password" autocomplete="current-password" />
<span class="text-danger" asp-validation-for="Password"></span>
</div>
<div class="col-12">
<div>
<label class="form-check">
<input class="form-check-input" asp-for="RememberMe" />
<span class="form-check-label">Remember me</span>
@ -102,12 +102,12 @@ else
</div>
</div>
<div class="button-row mt-3">
<div class="auth-actions">
<button class="btn btn-primary" type="submit">Login</button>
<a class="btn btn-outline-secondary" asp-action="Register">Create an account</a>
<a class="btn btn-outline-secondary" asp-action="ForgotPassword">Forgot password?</a>
</div>
<p class="mt-3 mb-0">
<p class="auth-help">
<a asp-action="ResendVerificationEmail">Need a new verification email?</a>
</p>
</form>

View File

@ -3,7 +3,7 @@
ViewData["Title"] = "Two-factor authentication";
}
<div class="page-heading compact">
<div class="page-heading compact auth-page-heading">
<div>
<p class="eyebrow">Account</p>
<h1>Two-factor authentication</h1>

View File

@ -896,6 +896,81 @@ a:focus-visible {
outline: none;
}
.auth-page-heading {
justify-content: center;
max-width: 560px;
margin-right: auto;
margin-left: auto;
text-align: center;
}
.auth-page-heading > div {
width: 100%;
}
.auth-page-heading .lead-text {
margin-right: auto;
margin-left: auto;
text-align: center;
}
.auth-card {
max-width: 560px;
margin: 0 auto;
padding: clamp(1.75rem, 4vw, 2.5rem);
}
.auth-form {
display: flex;
flex-direction: column;
gap: 1.35rem;
border-top: 0;
padding-top: 0;
}
.auth-form .alert {
margin-bottom: 0;
}
.auth-field-stack {
display: grid;
gap: 1rem;
}
.auth-field-stack .form-label {
font-weight: 650;
}
.auth-field-stack .form-check {
display: inline-flex;
align-items: center;
gap: 0.45rem;
margin-bottom: 0;
color: var(--plotline-text-muted);
font-weight: 650;
}
.auth-actions {
display: flex;
justify-content: center;
gap: 0.75rem;
flex-wrap: wrap;
}
.auth-actions .btn {
min-width: 8.75rem;
}
.auth-help {
margin: 0;
text-align: center;
font-size: 0.95rem;
}
.auth-help a {
font-weight: 650;
}
.two-factor-card {
max-width: 560px;
margin: 0 auto;
@ -1009,6 +1084,19 @@ a:focus-visible {
.two-factor-actions .btn {
width: 100%;
}
.auth-card {
padding: 1.35rem;
}
.auth-actions {
flex-direction: column;
width: 100%;
}
.auth-actions .btn {
width: 100%;
}
}
.plotline-confirm-modal {
@ -3392,6 +3480,21 @@ a:focus-visible {
background: #f8f1e7;
}
@media (min-width: 1061px) {
.marketing-hero {
display: flex;
align-items: center;
min-height: calc(100vh - 5.5rem);
padding-top: clamp(1.5rem, 3vw, 2.75rem);
padding-bottom: clamp(1.5rem, 3vw, 2.75rem);
}
.home-hero-image {
align-self: center;
margin-top: clamp(-8rem, -8vw, -4rem);
}
}
.writer-workspace {
position: relative;
min-height: 560px;

File diff suppressed because one or more lines are too long