diff --git a/src/App.svelte b/src/App.svelte index 78f36281..e88cfdea 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -52,6 +52,7 @@ import RunnerDetail from "./components/RunnerDetail.svelte"; import Imprint from "./components/Imprint.svelte"; import Privacy from "./components/Privacy.svelte"; +import ResetPassword from "./components/ResetPassword.svelte"; store.init(); registerSW(); @@ -61,6 +62,10 @@ + {:else if $router.path.includes('/reset')} + + + {:else if $router.path === '/about'} diff --git a/src/components/ResetPassword.svelte b/src/components/ResetPassword.svelte new file mode 100644 index 00000000..ad8b9792 --- /dev/null +++ b/src/components/ResetPassword.svelte @@ -0,0 +1,129 @@ + + +{#if state==="reset_success"} +
+
+ +

+ {$_('application_name')} +

+

+ {$_('successful-password-reset')} +

+

+ {$_('you-can-now-use-your-new-password-to-log-in-to-your-account')} +

+ +
+
+{:else if state==="reset_error"} +
+
+ +

+ {$_('application_name')} +

+

+ {$_('password-reset-failed')} +

+

+ {$_('please-request-a-new-reset-mail')} +

+ +
+
+{:else if state==="reset_in_progress"} +
+
+ +

+ {$_('application_name')} +

+

+ {$_('reset-password')} +

+
+
+
+ +
+
+ +
+ +
+
+
+
+{/if} diff --git a/src/locales/en.json b/src/locales/en.json index 215fa57a..dd9ccd3e 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -89,6 +89,7 @@ "forgot_password?": "Forgot your password?", "general-stats": "General Stats", "general_promise_error": "😢 Error", + "go-to-login": "Go To Login", "goback": "Go Home", "group": "Group", "groups": "Groups", @@ -115,6 +116,7 @@ "middle-name": "Middle name", "minimum-lap-time-in-s": "minimum lap time in s", "name": "Name", + "new-password": "New password", "no-license-text-could-be-found": "No license text could be found 😢", "no-tracks-added-yet": "there are no tracks added yet.", "organization": "Organization", @@ -123,18 +125,25 @@ "oss_credit_description": "We use a lot of open source software on these projects, and would like to thank the following projects and contributors who help make open source great!", "password": "Password", "password-is-required": "Password is required", + "password-reset-failed": "Password reset failed!", + "password-reset-in-progress": "Password Reset in Progress...", + "password-reset-successful": "Password Reset successful!", "permissions": "Permissions", "phone": "Phone", + "please-provide-a-password": "Please provide a password...", "please-provide-the-required-csv-xlsx-file": "Please provide the required csv/ xlsx file", "please-provide-the-required-information-to-add-a-new-runner": "Please provide the required information to add a new runner.", "please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.", + "please-request-a-new-reset-mail": "Please request a new reset mail...", "privacy": "Privacy 🔒", "privacy-loading": "Privacy loading...", "profile-picture": "Profile Picture", "read-license": "Read License", "register": "Register", "repo_link": "Link", + "request-a-new-reset-mail": "Request a new reset mail", "reset-my-password": "Reset my password", + "reset-password": "Reset your password", "runner-import": "Runner Import", "runner-updated": "Runner updated!", "runnerimport_verify_runners_org": "Please confirm these runners for import into the organization \"{org_name}\"", @@ -144,6 +153,7 @@ "settings": "Settings", "signout": "Sign out", "stats-are-being-loaded": "stats are being loaded...", + "successful-password-reset": "Successful password reset!", "team": "Team", "team-name": "Team name", "teams": "Teams", @@ -165,5 +175,6 @@ "users": "Users", "valid-email-is-required": "valid email is required", "welcome_wavinghand": "Welcome 👋", + "you-can-now-use-your-new-password-to-log-in-to-your-account": "You can now use your new password to log in to your account! 🎉", "your_profile": "Your Profile" } \ No newline at end of file