2026-01-18 19:20:50 +01:00
|
|
|
@page "/account/login"
|
|
|
|
|
@using TrueCV.Web.Components.Layout
|
|
|
|
|
@layout MainLayout
|
|
|
|
|
|
|
|
|
|
@using Microsoft.AspNetCore.Identity
|
|
|
|
|
@using TrueCV.Infrastructure.Identity
|
|
|
|
|
|
|
|
|
|
@inject SignInManager<ApplicationUser> SignInManager
|
|
|
|
|
@inject NavigationManager NavigationManager
|
|
|
|
|
|
|
|
|
|
<PageTitle>Login - TrueCV</PageTitle>
|
|
|
|
|
|
|
|
|
|
<div class="container py-5">
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="col-md-5">
|
|
|
|
|
<div class="card border-0 shadow">
|
|
|
|
|
<div class="card-body p-5">
|
|
|
|
|
<div class="text-center mb-4">
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" class="bi bi-patch-check-fill text-primary mb-3" viewBox="0 0 16 16">
|
|
|
|
|
<path d="M10.067.87a2.89 2.89 0 0 0-4.134 0l-.622.638-.89-.011a2.89 2.89 0 0 0-2.924 2.924l.01.89-.636.622a2.89 2.89 0 0 0 0 4.134l.637.622-.011.89a2.89 2.89 0 0 0 2.924 2.924l.89-.01.622.636a2.89 2.89 0 0 0 4.134 0l.622-.637.89.011a2.89 2.89 0 0 0 2.924-2.924l-.01-.89.636-.622a2.89 2.89 0 0 0 0-4.134l-.637-.622.011-.89a2.89 2.89 0 0 0-2.924-2.924l-.89.01-.622-.636zm.287 5.984-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7 8.793l2.646-2.647a.5.5 0 0 1 .708.708z"/>
|
|
|
|
|
</svg>
|
|
|
|
|
<h3 class="fw-bold">Welcome Back</h3>
|
|
|
|
|
<p class="text-muted">Sign in to your TrueCV account</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@if (!string.IsNullOrEmpty(_errorMessage))
|
|
|
|
|
{
|
2026-01-20 16:45:43 +01:00
|
|
|
<div class="alert alert-danger" role="alert">
|
2026-01-18 19:20:50 +01:00
|
|
|
@_errorMessage
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-20 16:45:43 +01:00
|
|
|
<form method="post" action="/account/perform-login">
|
|
|
|
|
<AntiforgeryToken />
|
|
|
|
|
<input type="hidden" name="returnUrl" value="@ReturnUrl" />
|
2026-01-18 19:20:50 +01:00
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="email" class="form-label">Email address</label>
|
2026-01-20 16:45:43 +01:00
|
|
|
<input id="email" name="email" type="email" class="form-control form-control-lg"
|
|
|
|
|
placeholder="name@example.com" required />
|
2026-01-18 19:20:50 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="password" class="form-label">Password</label>
|
2026-01-20 16:45:43 +01:00
|
|
|
<input id="password" name="password" type="password" class="form-control form-control-lg"
|
|
|
|
|
placeholder="Enter your password" required />
|
2026-01-18 19:20:50 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mb-3 form-check">
|
2026-01-20 16:45:43 +01:00
|
|
|
<input id="rememberMe" name="rememberMe" type="checkbox" class="form-check-input" value="true" />
|
2026-01-18 19:20:50 +01:00
|
|
|
<label class="form-check-label" for="rememberMe">
|
|
|
|
|
Remember me
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="d-grid">
|
2026-01-20 16:45:43 +01:00
|
|
|
<button type="submit" class="btn btn-primary btn-lg">
|
|
|
|
|
Sign In
|
2026-01-18 19:20:50 +01:00
|
|
|
</button>
|
|
|
|
|
</div>
|
2026-01-20 16:45:43 +01:00
|
|
|
</form>
|
2026-01-18 19:20:50 +01:00
|
|
|
|
|
|
|
|
<hr class="my-4" />
|
|
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
|
<p class="mb-0">
|
|
|
|
|
Don't have an account?
|
|
|
|
|
<a href="/account/register" class="text-decoration-none fw-medium">Create one</a>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@code {
|
|
|
|
|
private string? _errorMessage;
|
|
|
|
|
|
|
|
|
|
[SupplyParameterFromQuery]
|
|
|
|
|
public string? ReturnUrl { get; set; }
|
|
|
|
|
|
2026-01-20 16:45:43 +01:00
|
|
|
[SupplyParameterFromQuery(Name = "error")]
|
|
|
|
|
public string? Error { get; set; }
|
2026-01-18 19:20:50 +01:00
|
|
|
|
2026-01-20 16:45:43 +01:00
|
|
|
protected override void OnInitialized()
|
2026-01-18 19:20:50 +01:00
|
|
|
{
|
2026-01-20 16:45:43 +01:00
|
|
|
_errorMessage = Error;
|
2026-01-18 19:20:50 +01:00
|
|
|
}
|
|
|
|
|
}
|