diff --git a/package.json b/package.json index 19e3ebc3..2636cf66 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "license": "CC-BY-NC-SA-4.0", "dependencies": { - "@odit/lfk-client-js": "0.6.3", + "@odit/lfk-client-js": "0.6.4", "csvtojson": "^2.0.10", "gridjs": "3.3.0", "localforage": "1.9.0", diff --git a/src/App.svelte b/src/App.svelte index 335b2a7f..5b78d33f 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -42,7 +42,7 @@ import MainDashContent from "./components/dashboard/MainDashContent.svelte"; import Users from "./components/users/Users.svelte"; import About from "./components/general/About.svelte"; - import Settings from "./components/general/Settings.svelte"; + import Settings from "./components/settings/Settings.svelte"; import Transition from "./components/base/Transition.svelte"; import Orgs from "./components/orgs/Orgs.svelte"; import Runners from "./components/runners/Runners.svelte"; diff --git a/src/components/general/Settings.svelte b/src/components/general/Settings.svelte deleted file mode 100644 index f911d855..00000000 --- a/src/components/general/Settings.svelte +++ /dev/null @@ -1,35 +0,0 @@ - - -
-
-

- 🔹
{$_('settings')} -

-

- configure your profile however you want -

-
-
- -
-
- -
-

- Lorem ipsum dolor sit amet consectetur, adipisicing elit. Temporibus et - amet voluptate nulla accusantium vero blanditiis nobis facere veritatis. - Impedit deserunt saepe aliquid unde consequuntur officia consequatur - fugit iusto dolorem? -

-
- -
-
diff --git a/src/components/settings/ConfirmProfileDeletion.svelte b/src/components/settings/ConfirmProfileDeletion.svelte new file mode 100644 index 00000000..10e79cd6 --- /dev/null +++ b/src/components/settings/ConfirmProfileDeletion.svelte @@ -0,0 +1,90 @@ + + +{#if modal_open} +
+
+ +
+{/if} diff --git a/src/components/settings/Settings.svelte b/src/components/settings/Settings.svelte new file mode 100644 index 00000000..e570390a --- /dev/null +++ b/src/components/settings/Settings.svelte @@ -0,0 +1,319 @@ + + + +
+
+

+ 🔹
{$_('settings')} +

+
+
+
+
+
+
+
+
+

+ {$_('profile')} +

+

+ {$_('everything-concerning-your-profile')} +

+
+
+ {#await user_promise} + {$_('loading-profile-data')} + {:then} +
+
+
+
+ + +
+ + {$_('profile-picture')} + + +
+
+
+ + +
+
+ + +
+ {#if !isEmail(editable.email)} + {$_('valid-email-is-required')} + {/if} +
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+
+ {/await} +
+
+
+
+
+
+
+
+

+ {$_('password')} +

+

+ {$_('change-your-password-here')} +

+
+
+ {#await user_promise} + {$_('loading-profile-data')} + {:then} +
+
+
+ +
+ +
+ +
+ +
+ {#if password_change != password_confirm && password_change.length > 0} + {$_('passwords-dont-match')} + {/if} +
+
+ + {#if update_password_enabled} +

+ {$_('after-the-update-youll-get-logged-out-please-login-with-your-new-password-after-that')} +

+ {/if} +
+
+
+ {/await} +
+
+
+
+
+
+
+
+

+ {$_('danger-zone')} +

+

+ {$_('stuff-that-could-harm-your-profile')} +

+
+
+ {#await user_promise} + {$_('loading-profile-data')} + {:then} +
+
+
+ + {#if delete_triggered} + + + {/if} + {#if !delete_triggered} + + {/if} + +
+
+
+ {/await} +
+
+
+
diff --git a/src/locales/de.json b/src/locales/de.json index b76856db..79a9d436 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -20,6 +20,8 @@ "adding-scan": "Scan wird hinzugefĂŒgt", "address": "Adresse", "address-is-required": "Du musst eine Adresse angeben", + "after-deletion-we-cant-restore-your-old-profile": "Nach der Löschung können auch die Admins dein Profil nicht wiederherstellen!", + "after-the-update-youll-get-logged-out-please-login-with-your-new-password-after-that": "Nach der Änderung wirst du abgemeldet - bitte melde dich dann mit deinem neuen Passwort an.", "all-associated-donations-will-get-deleted-as-well": "Alle Sponsorings dieser Sponsor:in werden ebenfalls gelöscht", "all-associated-runners-will-be-deleted-too": "Alle zugehörigen LĂ€ufer:innen werden auch gelöscht!", "all-associated-teams-and-runners-will-be-deleted-too": "Alle assoziierten Teams und LĂ€ufer:innen werden auch gelöscht!", @@ -34,18 +36,23 @@ "cancel": "Abbrechen", "cancel-delete": "Löschen abbrechen", "cancel-keep-donor": "Abbrechen, Sponsor:in behalten", + "cancel-keep-my-profile": "Abbrechen, mein Profil behalten", "cancel-keep-organization": "Abbrechen und Organisation bearbeiten", "cancel-keep-team": "Abbrechen, Team behalten", "cannot-reset-your-password-directly": "Schade. \nWir können das Passwort leider nicht direkt zurĂŒcksetzen.\nBitte sende uns eine Mail in der du deine IdentitĂ€t bestĂ€tigst.", + "change-your-password-here": "Hier kannst du dein Passwort Ă€ndern", + "changing-your-password": "Passwort wird geĂ€ndert", "city": "Stadt", "close": "Schließen", "configure-the-tracks-and-minimum-lap-times": "Bearbeite die Tracks und ihre minimale Rundenzeit", "confirm": "BestĂ€tigen", "confirm-delete": "Löschung BestĂ€tigen", "confirm-delete-donor-with-all-donations": "BestĂ€tigen, Sponsor:in mit allen Sponsorings löschen", + "confirm-delete-my-user-profile": "BestĂ€tigung, mein Benutzerprofil löschen", "confirm-delete-organization-and-associated-teams-runners": "BestĂ€tugung, lösche die Organisation und alle zugehörigen Teams und LĂ€ufer:innen.", "confirm-delete-team-and-associated-runners": "BestĂ€tigung, lösche das Team mitsamt seinen LĂ€ufer:innen.", "confirm-deletion": "Löschung BestĂ€tigen", + "confirm-the-new-password": "Neues Passwort bestĂ€tigen", "contact": "Kontakt", "contact-deleted": "Kontakt gelöscht", "contact-information": "Kontaktinformation", @@ -79,6 +86,7 @@ "csv_import__lastname": "Nachname", "csv_import__middlename": "Mittelname", "csv_import__team": "Team", + "danger-zone": "Gefahrenzone", "dashboard-greeting": "Moin", "dashboard-title": "Dashboard", "datatable": { @@ -102,6 +110,7 @@ "delete-donor": "Sponsor:in löschen", "delete-group": "Gruppe löschen", "delete-organization": "Organisation löschen", + "delete-profile": "Profil löschen", "delete-runner": "LĂ€ufer:in löschen", "delete-scan": "Scan löschen", "delete-station": "Station löschen", @@ -117,6 +126,7 @@ "distance-donation": "Sponsoring", "distance-in-km": "Distanz (in KM)", "distance-track": "Distanz (+Track)", + "do-you-really-want-to-delete-your-profile": "Möchtest du dein Profil wirklich löschen?", "do-you-want-to-delete-the-organization-delete_org-name": "Möchtest du die Organisation {orgname} löschen?", "do-you-want-to-delete-the-team-delete_team-name": "Möchtest du das Team {teamname} löschen?", "do-you-want-to-delete-this-donor-with-all-related-donations": "Möchtest du diese Sponsor:in mit all ihren Sponsorings löschen?", @@ -141,6 +151,7 @@ "english": "Englisch", "error_on_login": "😱Fehler beim Login", "erteilte": "Direkt erteilte", + "everything-concerning-your-profile": "Alles zu deinem Profil", "everything-is-more-fun-together": "Im Team macht's mehr Spaß đŸƒâ€â™‚ïžđŸƒâ€â™€ïžđŸƒâ€â™‚ïž", "faq": "FAQ", "filter-by-organization-team": "Filtern nach Organisation / Team", @@ -192,6 +203,7 @@ "loading-donation-details": "Lade Sponsoringdetails", "loading-donor-details": "Lade Details", "loading-group-detail": "Lade Gruppendetails...", + "loading-profile-data": "Lade Profildaten", "loading-runners": "LĂ€ufer:innen werden geladen...", "loading-station-details": "Lade Scanstation-Details ...", "log_in": "Anmelden", @@ -227,11 +239,13 @@ "orgs": "Organisationen", "oss_credit_description": "Wir verwenden eine Menge Open Source-Software bei diesen Projekten und möchten uns bei den folgenden Projekten und Mitwirkenden bedanken, die dazu beitragen, Open Source großartig zu machen!", "password": "Passwort", + "password-changed": "Passwort wurde aktualisiert!", "password-is-required": "Passwort muss angegeben werden", "password-reset-failed": "Passwort zurĂŒcksetzen ist fehlgeschlagen!", "password-reset-in-progress": "Passwort wird zurĂŒckgesetzt...", "password-reset-mail-sent": "Passwort-Reset Mail wurde an \"{usersEmail}\" geschickt.", "password-reset-successful": "Passwort erfolgreich zurĂŒckgesetzt!", + "passwords-dont-match": "Die Passwörter stimmen nicht ĂŒberein.", "pdf-generation-failed": "PDF Generierung fehlgeschlagen!", "pdf-successfully-generated": "PDF wurde erfolgreich generiert!", "pdfs-successfully-generated": "Alle PDFs wurden generiert!", @@ -254,7 +268,9 @@ "please-request-a-new-reset-mail": "Bitte eine neue Passwortreset-Mail anfordern...", "privacy": "Datenschutz", "privacy-loading": "DatenschutzerklĂ€rung lĂ€dt...", + "profile": "Profil", "profile-picture": "Profilbild", + "profile-updated": "Profil wurde aktualisiert!", "read-license": "Lizenz-Text lesen", "receipt-needed": "Spendenquittung benötigt", "repo_link": "Link", @@ -290,9 +306,11 @@ "send-a-mail-to-lfk-odit-services": "Sende eine Mail an lfk@odit.services", "set-the-user-active-inactive": "Den Benutzer auf (in)aktiv setzen", "settings": "Einstellungen", + "settings-for-your-profile": "Die Einstellungen deines Accounts", "something-about-the-group": "Infos zur Gruppe", "stats-are-being-loaded": "Die Statistiken werden geladen...", "status": "Status", + "stuff-that-could-harm-your-profile": "Einstellungen, die deinem Profil nachhaltig schaden können", "successful-password-reset": "Passwort erfolgreich zurĂŒckgesetzt!", "team": "Team", "team-detail-is-being-loaded": "Team wird geladen...", @@ -325,6 +343,7 @@ "track-name": "Trackname", "track-name-must-not-be-empty": "Der Name muss angegeben werden", "tracks": "Tracks", + "update-password": "Passwort Ă€ndern", "updated-contact": "Kontakt aktualisiert!", "updated-donor": "Sponsor:in wurde aktualisiert", "updated-organization": "Organisation wurde aktualisiert", @@ -334,6 +353,7 @@ "updating-permissions": "Berechtigungen werden aktualisiert...", "updating-runner": "LĂ€ufer:in wird aktualisiert.", "updating-user": "Benutzer:in wird aktualisiert...", + "updating-your-profile": "Profil wird aktualisiert...", "user-added": "Benutzer hinzugefĂŒgt", "user-groups": "Benutzergruppen", "user-is-being-added": "Benutzer wird hinzugefĂŒgt ...", @@ -348,6 +368,7 @@ "verfuegbare": "VerfĂŒgbar", "welcome_wavinghand": "Willkommen 👋", "yes-i-copied-the-token": "Ja, ich habe den Token kopiert", + "you-are-going-to-loose-all-permissions-and-access-to-the-runner-system": "Du wirst all deine Berechtigungen und den Zugriff aufs LĂ€ufersystem verlieren!", "you-can-now-use-your-new-password-to-log-in-to-your-account": "Du kannst dich jetzt mit deinem neuen Passwort anmelden! 🎉", "you-have-to-provide-an-organization": "Du musst eine Organisation angeben", "zip-postal-code": "Postleitzahl" diff --git a/src/locales/en.json b/src/locales/en.json index 4c53be67..d68823ea 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -20,6 +20,8 @@ "adding-scan": "Adding Scan", "address": "Address", "address-is-required": "Address is required", + "after-deletion-we-cant-restore-your-old-profile": "After deletion we can't restore your old profile!", + "after-the-update-youll-get-logged-out-please-login-with-your-new-password-after-that": "After the update you'll get logged out - Please login with your new password after that.", "all-associated-donations-will-get-deleted-as-well": "All associated donations will get deleted as well", "all-associated-runners-will-be-deleted-too": "All associated runners will be deleted too!", "all-associated-teams-and-runners-will-be-deleted-too": "All associated teams and runners will be deleted too!", @@ -34,18 +36,23 @@ "cancel": "Cancel", "cancel-delete": "Cancel Delete", "cancel-keep-donor": "Cancel, keep donor", + "cancel-keep-my-profile": "Cancel, keep my profile", "cancel-keep-organization": "Cancel, keep organization", "cancel-keep-team": "Cancel, keep team", "cannot-reset-your-password-directly": "Bummer. We unfortunately cannot reset your password directly. Please send us a mail and confirm your identity", + "change-your-password-here": "Change your password here", + "changing-your-password": "Changing your password", "city": "City", "close": "Close", "configure-the-tracks-and-minimum-lap-times": "configure the tracks & minimum lap times", "confirm": "Confirm", "confirm-delete": "Confirm Delete", "confirm-delete-donor-with-all-donations": "Confirm, delete donor with all donations", + "confirm-delete-my-user-profile": "Confirm, delete my user profile", "confirm-delete-organization-and-associated-teams-runners": "Confirm, delete organization and associated teams+runners.", "confirm-delete-team-and-associated-runners": "Confirm, delete team and associated runners.", "confirm-deletion": "Confirm Deletion", + "confirm-the-new-password": "Confirm the new password", "contact": "Contact", "contact-deleted": "Contact deleted", "contact-information": "Contact Information", @@ -79,6 +86,7 @@ "csv_import__lastname": "Lastname", "csv_import__middlename": "Middlename", "csv_import__team": "Team", + "danger-zone": "Danger zone", "dashboard-greeting": "hello there", "dashboard-title": "Dashboard", "datatable": { @@ -102,6 +110,7 @@ "delete-donor": "Delete donor", "delete-group": "Delete Group", "delete-organization": "Delete Organization", + "delete-profile": "Delete Profile", "delete-runner": "Delete Runner", "delete-scan": "Delete scan", "delete-station": "Delete station", @@ -117,6 +126,7 @@ "distance-donation": "distance donation", "distance-in-km": "Distance in km", "distance-track": "Distance (+Track)", + "do-you-really-want-to-delete-your-profile": "Do you really want to delete your profile?", "do-you-want-to-delete-the-organization-delete_org-name": "Do you want to delete the organization {orgname}?", "do-you-want-to-delete-the-team-delete_team-name": "Do you want to delete the team {teamname}?", "do-you-want-to-delete-this-donor-with-all-related-donations": "Do you want to delete this donor with all related donations", @@ -141,6 +151,7 @@ "english": "English", "error_on_login": "Error on login", "erteilte": "Directly granted", + "everything-concerning-your-profile": "Everything concerning your profile", "everything-is-more-fun-together": "everything is more fun together đŸƒâ€â™‚ïžđŸƒâ€â™€ïžđŸƒâ€â™‚ïž", "faq": "FAQ", "filter-by-organization-team": "Filter by Organization/ Team", @@ -192,6 +203,7 @@ "loading-donation-details": "Loading donation details", "loading-donor-details": "Loading donor details", "loading-group-detail": "Loading group detail...", + "loading-profile-data": "Loading profile data", "loading-runners": "loading runners...", "loading-station-details": "Loading station details", "log_in": "Log in", @@ -227,11 +239,13 @@ "orgs": "Organizations", "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-changed": "Password changed!", "password-is-required": "Password is required", "password-reset-failed": "Password reset failed!", "password-reset-in-progress": "Password Reset in Progress...", "password-reset-mail-sent": "Password reset mail was sent to \"{usersEmail}\".", "password-reset-successful": "Password Reset successful!", + "passwords-dont-match": "Passwords don't match", "pdf-generation-failed": "PDF generation failed!", "pdf-successfully-generated": "PDF successfully generated!", "pdfs-successfully-generated": "PDFs successfully generated!", @@ -254,7 +268,9 @@ "please-request-a-new-reset-mail": "Please request a new reset mail...", "privacy": "Privacy", "privacy-loading": "Privacy loading...", + "profile": "Profile", "profile-picture": "Profile Picture", + "profile-updated": "Profile updated!", "read-license": "Read License", "receipt-needed": "Receipt needed", "repo_link": "Link", @@ -290,9 +306,11 @@ "send-a-mail-to-lfk-odit-services": "send a mail to lfk@odit.services", "set-the-user-active-inactive": "set the user active/ inactive", "settings": "Settings", + "settings-for-your-profile": "Settings for your profile", "something-about-the-group": "Something about the group...", "stats-are-being-loaded": "stats are being loaded...", "status": "Status", + "stuff-that-could-harm-your-profile": "Stuff that could harm your profile", "successful-password-reset": "Successful password reset!", "team": "Team", "team-detail-is-being-loaded": "team detail is being loaded...", @@ -325,6 +343,7 @@ "track-name": "Track name", "track-name-must-not-be-empty": "Track name must not be empty", "tracks": "Tracks", + "update-password": "Update password", "updated-contact": "Updated contact!", "updated-donor": "updated donor", "updated-organization": "updated organization", @@ -334,6 +353,7 @@ "updating-permissions": "updating permissions...", "updating-runner": "Updating runner...", "updating-user": "updating user...", + "updating-your-profile": "Updating your profile...", "user-added": "User added", "user-groups": "User Groups", "user-is-being-added": "User is being added...", @@ -348,6 +368,7 @@ "verfuegbare": "availdable", "welcome_wavinghand": "Welcome 👋", "yes-i-copied-the-token": "Yes, I copied the token", + "you-are-going-to-loose-all-permissions-and-access-to-the-runner-system": "You are going to loose all permissions and access to the runner system!", "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! 🎉", "you-have-to-provide-an-organization": "You have to provide an organization", "zip-postal-code": "ZIP/ postal code"