@page "/settings" @attribute [Authorize] @using BudgetApp.Data.Entities @using Microsoft.AspNetCore.Identity @inject UserManager UserManager @inject SignInManager SignInManager @inject AuthenticationStateProvider AuthStateProvider @inject ApplicationDbContext DbContext @inject NavigationManager Navigation @inject AppState AppState @rendermode InteractiveServer Settings

Settings beta

Change your password, reset your data or delete your account.

@* ── Change Password ── *@
Change Password
@if (_passwordSuccess) {
Password changed successfully.
} @if (!string.IsNullOrEmpty(_passwordError)) {
@_passwordError
}
@* ── Reset Data ── *@
Reset Data

This will permanently delete all your accounts, transactions and categories, giving you a clean slate. Your user account and password will be kept.

@if (_resetSuccess) {
All data has been reset successfully.
} @if (!string.IsNullOrEmpty(_resetError)) {
@_resetError
} @if (!_confirmingReset) { } else {
Are you sure? This cannot be undone. Type I UNDERSTAND and enter your password to confirm.
}
@* ── Delete Account ── *@
Delete Account

This will permanently delete your account and all associated data (accounts, transactions, and categories). This action cannot be undone.

@if (!string.IsNullOrEmpty(_deleteError)) {
@_deleteError
} @if (!_confirmingDelete) { } else {
Are you sure? Type your password to confirm.
}