fix: migrate to IDbContextFactory and remove direct AppDbContext from DI (#11)

Reviewed-on: #11
Co-authored-by: Marek Jasiński <jasins.marek@gmail.com>
Co-committed-by: Marek Jasiński <jasins.marek@gmail.com>
This commit was merged in pull request #11.
This commit is contained in:
2026-05-07 16:39:21 +00:00
committed by Marek Jaisński
parent 3faecbb639
commit 2248a2b757
35 changed files with 983 additions and 215 deletions
@@ -59,6 +59,13 @@
<div class="auth-error">@_errorMessage</div>
}
<div class="auth-options">
<label class="remember-me">
<InputCheckbox @bind-Value="_loginModel.RememberMe" />
<span>Zapamiętaj mnie</span>
</label>
</div>
<button type="submit" class="btn-submit-auth" disabled="@_isSubmitting">
@if (_isSubmitting)
{
@@ -95,7 +102,7 @@
try
{
var success = await IdentityService.LoginAsync(_loginModel.Email, _loginModel.Password);
var success = await IdentityService.LoginAsync(_loginModel.Email, _loginModel.Password, _loginModel.RememberMe);
if (success) NavigationManager.NavigateTo("/");
else _errorMessage = "Nieprawidłowy e-mail lub hasło.";
}
@@ -114,5 +121,7 @@
[System.ComponentModel.DataAnnotations.Required]
public string Password { get; set; } = string.Empty;
public bool RememberMe { get; set; }
}
}