feat: add "remember me for 30 days" to the login screen

Default stays sessionStorage (signed out on tab close). Checking the box
instead stores the credential in localStorage with an explicit 30-day
expiry checked on every page load, so staying logged in has a hard ceiling
rather than lasting forever.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01855PiW5Wd8n4aRW4n9kByY
This commit is contained in:
ZProger
2026-08-30 03:10:47 +03:00
parent 1de9ac272e
commit f74305f0be
3 changed files with 69 additions and 12 deletions

View File

@@ -46,6 +46,7 @@ const ru = {
"auth.subtitle": "Личные финансы",
"auth.usernameLabel": "Логин",
"auth.passwordLabel": "Пароль",
"auth.rememberMe": "Запомнить меня на 30 дней",
"auth.submitButton": "Войти",
"auth.submitting": "Вход…",
"auth.errorInvalidCredentials": "Неверный логин или пароль",
@@ -453,6 +454,7 @@ const en: Record<keyof typeof ru, string> = {
"auth.subtitle": "Personal finance",
"auth.usernameLabel": "Username",
"auth.passwordLabel": "Password",
"auth.rememberMe": "Remember me for 30 days",
"auth.submitButton": "Sign in",
"auth.submitting": "Signing in…",
"auth.errorInvalidCredentials": "Incorrect username or password",