feat(auth): implement user authentication and profile management

- Added authentication context and provider to manage user state.
- Created login and registration forms with validation and error handling.
- Implemented user profile component for updating user information and changing passwords.
- Introduced user settings in the database for notification preferences.
- Updated translations for authentication-related strings in English and German.
- Enhanced styles for authentication components and user profile.
- Added middleware for optional and required authentication checks.
This commit is contained in:
Daniel Volz
2025-12-26 19:57:35 +01:00
parent 5900fddb2d
commit a7f9f90db4
20 changed files with 2020 additions and 402 deletions
+38
View File
@@ -58,6 +58,8 @@
"pills": "Pills",
"days": "Days",
"currentPills": "Current pills",
"fullBlisters": "Full blisters",
"openBlister": "Open blister",
"daysLeft": "Days left",
"status": "Stock",
"runsOut": "Runs out",
@@ -218,6 +220,35 @@
"takenBy": "taken by",
"markAsTaken": "Mark as taken"
},
"auth": {
"login": "Login",
"logout": "Logout",
"register": "Create Account",
"createAdmin": "Create Admin Account",
"profile": "Profile",
"username": "Username",
"password": "Password",
"email": "Email",
"confirmPassword": "Confirm Password",
"currentPassword": "Current Password",
"newPassword": "New Password",
"changePassword": "Change Password",
"forgotPassword": "Forgot password?",
"sendResetLink": "Send Reset Link",
"resetPassword": "Reset Password",
"backToLogin": "Back to Login",
"createAccount": "Create account",
"alreadyHaveAccount": "Already have an account? Login",
"firstUserInfo": "This will be the administrator account.",
"usernameHint": "Letters, numbers, underscores, and hyphens only",
"emailHint": "For password recovery",
"passwordMismatch": "Passwords do not match",
"checkEmail": "Check your email",
"resetEmailSent": "If an account with this email exists, we've sent a password reset link.",
"passwordReset": "Password Reset",
"passwordResetSuccess": "Your password has been reset. Redirecting to login...",
"profileUpdated": "Profile updated successfully"
},
"common": {
"loading": "Loading...",
"sending": "Sending...",
@@ -235,9 +266,16 @@
"optional": "optional",
"pill": "pill",
"pills": "pills",
"of": "of",
"loose": "loose",
"none": "None",
"day": "day",
"days": "days",
"blister": "blister",
"blisters": "blisters",
"fullBlister": "full blister",
"fullBlisters": "full blisters",
"inBlister": "in 1 blister",
"total": "total"
}
}