mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-24 15:29:36 +02:00
feat: add password validation and error messages, enhance CityCard styling, and update localization for email and password prompts
This commit is contained in:
parent
22790ae7c0
commit
013a2cc751
12 changed files with 154 additions and 24 deletions
|
@ -45,7 +45,9 @@
|
|||
<div class="card-body">
|
||||
<h2 class="card-title overflow-ellipsis">{city.name}</h2>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<div class="badge badge-primary">{city.id}</div>
|
||||
<div class="badge badge-neutral-300">{city.id}</div>
|
||||
</div>
|
||||
<div class="card-actions justify-end">
|
||||
{#if !visited}
|
||||
<button class="btn btn-primary" on:click={markVisited}
|
||||
>{$t('adventures.mark_visited')}</button
|
||||
|
@ -55,9 +57,5 @@
|
|||
<button class="btn btn-warning" on:click={removeVisit}>{$t('adventures.remove')}</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="card-actions justify-end">
|
||||
<!-- <button class="btn btn-info" on:click={moreInfo}>More Info</button> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -299,7 +299,20 @@
|
|||
"no_countries_found": "Keine Länder gefunden",
|
||||
"not_visited": "Nicht besucht",
|
||||
"num_countries": "Länder gefunden",
|
||||
"partially_visited": "Teilweise besucht"
|
||||
"partially_visited": "Teilweise besucht",
|
||||
"all_visited": "Sie haben alle Regionen in besucht",
|
||||
"cities": "Städte",
|
||||
"failed_to_mark_visit": "Der Besuch konnte nicht markiert werden",
|
||||
"failed_to_remove_visit": "Der Besuch von konnte nicht entfernt werden",
|
||||
"marked_visited": "als besucht markiert",
|
||||
"no_cities_found": "Keine Städte gefunden",
|
||||
"region_failed_visited": "Die Region konnte nicht als besucht markiert werden",
|
||||
"region_stats": "Regionsstatistiken",
|
||||
"regions_in": "Regionen in",
|
||||
"removed": "ENTFERNT",
|
||||
"view_cities": "Städte anzeigen",
|
||||
"visit_remove_failed": "Der Besuch konnte nicht entfernt werden",
|
||||
"visit_to": "Besuch bei"
|
||||
},
|
||||
"settings": {
|
||||
"account_settings": "Benutzerkontoeinstellungen",
|
||||
|
@ -378,7 +391,9 @@
|
|||
"no_verified_email_warning": "Sie müssen über eine verifizierte E-Mail-Adresse verfügen, um die Zwei-Faktor-Authentifizierung zu aktivieren.",
|
||||
"social_auth_desc": "Aktivieren oder deaktivieren Sie soziale und OIDC-Authentifizierungsanbieter für Ihr Konto. \nMit diesen Verbindungen können Sie sich bei selbst gehosteten Authentifizierungsidentitätsanbietern wie Authentik oder Drittanbietern wie GitHub anmelden.",
|
||||
"social_auth_desc_2": "Diese Einstellungen werden auf dem AdventureLog-Server verwaltet und müssen vom Administrator manuell aktiviert werden.",
|
||||
"social_oidc_auth": "Soziale und OIDC-Authentifizierung"
|
||||
"social_oidc_auth": "Soziale und OIDC-Authentifizierung",
|
||||
"add_email": "E-Mail hinzufügen",
|
||||
"password_too_short": "Das Passwort muss mindestens 6 Zeichen lang sein"
|
||||
},
|
||||
"checklist": {
|
||||
"add_item": "Artikel hinzufügen",
|
||||
|
|
|
@ -391,7 +391,9 @@
|
|||
"social_auth_desc": "Enable or disable social and OIDC authentication providers for your account. These connections allow you to sign in with self hosted authentication identity providers like Authentik or 3rd party providers like GitHub.",
|
||||
"social_auth_desc_2": "These settings are managed in the AdventureLog server and must be manually enabled by the administrator.",
|
||||
"documentation_link": "Documentation Link",
|
||||
"launch_account_connections": "Launch Account Connections"
|
||||
"launch_account_connections": "Launch Account Connections",
|
||||
"password_too_short": "Password must be at least 6 characters",
|
||||
"add_email": "Add Email"
|
||||
},
|
||||
"collection": {
|
||||
"collection_created": "Collection created successfully!",
|
||||
|
|
|
@ -275,7 +275,20 @@
|
|||
"not_visited": "No visitado",
|
||||
"num_countries": "países encontrados",
|
||||
"partially_visited": "Parcialmente visitado",
|
||||
"country_list": "Lista de países"
|
||||
"country_list": "Lista de países",
|
||||
"all_visited": "Has visitado todas las regiones en",
|
||||
"cities": "ciudades",
|
||||
"failed_to_mark_visit": "No se pudo marcar la visita a",
|
||||
"failed_to_remove_visit": "No se pudo eliminar la visita a",
|
||||
"marked_visited": "marcado como visitado",
|
||||
"no_cities_found": "No se encontraron ciudades",
|
||||
"region_failed_visited": "No se pudo marcar la región como visitada",
|
||||
"region_stats": "Estadísticas de la región",
|
||||
"regions_in": "Regiones en",
|
||||
"removed": "remoto",
|
||||
"view_cities": "Ver ciudades",
|
||||
"visit_remove_failed": "No se pudo eliminar la visita",
|
||||
"visit_to": "Visita a"
|
||||
},
|
||||
"auth": {
|
||||
"forgot_password": "¿Has olvidado tu contraseña?",
|
||||
|
@ -378,7 +391,9 @@
|
|||
"no_verified_email_warning": "Debe tener una dirección de correo electrónico verificada para habilitar la autenticación de dos factores.",
|
||||
"social_auth_desc": "Habilite o deshabilite los proveedores de autenticación social y OIDC para su cuenta. \nEstas conexiones le permiten iniciar sesión con proveedores de identidad de autenticación autohospedados como Authentik o proveedores externos como GitHub.",
|
||||
"social_auth_desc_2": "Estas configuraciones se administran en el servidor AdventureLog y el administrador debe habilitarlas manualmente.",
|
||||
"social_oidc_auth": "Autenticación social y OIDC"
|
||||
"social_oidc_auth": "Autenticación social y OIDC",
|
||||
"add_email": "Agregar correo electrónico",
|
||||
"password_too_short": "La contraseña debe tener al menos 6 caracteres."
|
||||
},
|
||||
"checklist": {
|
||||
"add_item": "Agregar artículo",
|
||||
|
|
|
@ -299,7 +299,20 @@
|
|||
"no_countries_found": "Aucun pays trouvé",
|
||||
"not_visited": "Non visité",
|
||||
"num_countries": "pays trouvés",
|
||||
"partially_visited": "Partiellement visité"
|
||||
"partially_visited": "Partiellement visité",
|
||||
"all_visited": "Vous avez visité toutes les régions de",
|
||||
"cities": "villes",
|
||||
"failed_to_mark_visit": "Échec de la notation de la visite à",
|
||||
"failed_to_remove_visit": "Échec de la suppression de la visite à",
|
||||
"marked_visited": "marqué comme visité",
|
||||
"no_cities_found": "Aucune ville trouvée",
|
||||
"region_failed_visited": "Échec du marquage de la région comme visitée",
|
||||
"region_stats": "Statistiques de la région",
|
||||
"regions_in": "Régions dans",
|
||||
"removed": "supprimé",
|
||||
"view_cities": "Voir les villes",
|
||||
"visit_remove_failed": "Échec de la suppression de la visite",
|
||||
"visit_to": "Visite à"
|
||||
},
|
||||
"settings": {
|
||||
"account_settings": "Paramètres du compte utilisateur",
|
||||
|
@ -378,7 +391,9 @@
|
|||
"no_verified_email_warning": "Vous devez disposer d'une adresse e-mail vérifiée pour activer l'authentification à deux facteurs.",
|
||||
"social_auth_desc": "Activez ou désactivez les fournisseurs d'authentification sociale et OIDC pour votre compte. \nCes connexions vous permettent de vous connecter avec des fournisseurs d'identité d'authentification auto-hébergés comme Authentik ou des fournisseurs tiers comme GitHub.",
|
||||
"social_auth_desc_2": "Ces paramètres sont gérés sur le serveur AdventureLog et doivent être activés manuellement par l'administrateur.",
|
||||
"social_oidc_auth": "Authentification sociale et OIDC"
|
||||
"social_oidc_auth": "Authentification sociale et OIDC",
|
||||
"add_email": "Ajouter un e-mail",
|
||||
"password_too_short": "Le mot de passe doit contenir au moins 6 caractères"
|
||||
},
|
||||
"checklist": {
|
||||
"add_item": "Ajouter un article",
|
||||
|
|
|
@ -299,7 +299,20 @@
|
|||
"no_countries_found": "Nessun paese trovato",
|
||||
"not_visited": "Non visitato",
|
||||
"num_countries": "paesi trovati",
|
||||
"partially_visited": "Parzialmente visitato"
|
||||
"partially_visited": "Parzialmente visitato",
|
||||
"all_visited": "Hai visitato tutte le regioni in",
|
||||
"cities": "città",
|
||||
"failed_to_mark_visit": "Impossibile contrassegnare la visita a",
|
||||
"failed_to_remove_visit": "Impossibile rimuovere la visita a",
|
||||
"marked_visited": "contrassegnato come visitato",
|
||||
"no_cities_found": "Nessuna città trovata",
|
||||
"region_failed_visited": "Impossibile contrassegnare la regione come visitata",
|
||||
"region_stats": "Statistiche della regione",
|
||||
"regions_in": "Regioni dentro",
|
||||
"removed": "RIMOSSO",
|
||||
"view_cities": "Visualizza città",
|
||||
"visit_remove_failed": "Impossibile rimuovere la visita",
|
||||
"visit_to": "Visita a"
|
||||
},
|
||||
"settings": {
|
||||
"account_settings": "Impostazioni dell'account utente",
|
||||
|
@ -378,7 +391,9 @@
|
|||
"no_verified_email_warning": "È necessario disporre di un indirizzo e-mail verificato per abilitare l'autenticazione a due fattori.",
|
||||
"social_auth_desc": "Abilita o disabilita i provider di autenticazione social e OIDC per il tuo account. \nQueste connessioni ti consentono di accedere con provider di identità di autenticazione self-hosted come Authentik o provider di terze parti come GitHub.",
|
||||
"social_auth_desc_2": "Queste impostazioni sono gestite nel server AdventureLog e devono essere abilitate manualmente dall'amministratore.",
|
||||
"social_oidc_auth": "Autenticazione sociale e OIDC"
|
||||
"social_oidc_auth": "Autenticazione sociale e OIDC",
|
||||
"add_email": "Aggiungi e-mail",
|
||||
"password_too_short": "La password deve contenere almeno 6 caratteri"
|
||||
},
|
||||
"checklist": {
|
||||
"add_item": "Aggiungi articolo",
|
||||
|
|
|
@ -299,7 +299,20 @@
|
|||
"no_countries_found": "Geen landen gevonden",
|
||||
"not_visited": "Niet bezocht",
|
||||
"num_countries": "landen gevonden",
|
||||
"partially_visited": "Gedeeltelijk bezocht"
|
||||
"partially_visited": "Gedeeltelijk bezocht",
|
||||
"all_visited": "Je hebt alle regio's in bezocht",
|
||||
"cities": "steden",
|
||||
"failed_to_mark_visit": "Kan bezoek aan niet markeren",
|
||||
"failed_to_remove_visit": "Kan bezoek aan niet verwijderen",
|
||||
"marked_visited": "gemarkeerd als bezocht",
|
||||
"no_cities_found": "Geen steden gevonden",
|
||||
"region_failed_visited": "Kan de regio niet als bezocht markeren",
|
||||
"region_stats": "Regiostatistieken",
|
||||
"regions_in": "Regio's binnen",
|
||||
"removed": "VERWIJDERD",
|
||||
"view_cities": "Steden bekijken",
|
||||
"visit_remove_failed": "Kan bezoek niet verwijderen",
|
||||
"visit_to": "Bezoek aan"
|
||||
},
|
||||
"settings": {
|
||||
"account_settings": "Gebruikersaccount instellingen",
|
||||
|
@ -378,7 +391,9 @@
|
|||
"no_verified_email_warning": "U moet een geverifieerd e-mailadres hebben om tweefactorauthenticatie in te schakelen.",
|
||||
"social_auth_desc": "Schakel sociale en OIDC-authenticatieproviders in of uit voor uw account. \nMet deze verbindingen kunt u inloggen met zelfgehoste authenticatie-identiteitsproviders zoals Authentik of externe providers zoals GitHub.",
|
||||
"social_auth_desc_2": "Deze instellingen worden beheerd op de AdventureLog-server en moeten handmatig worden ingeschakeld door de beheerder.",
|
||||
"social_oidc_auth": "Sociale en OIDC-authenticatie"
|
||||
"social_oidc_auth": "Sociale en OIDC-authenticatie",
|
||||
"add_email": "E-mail toevoegen",
|
||||
"password_too_short": "Wachtwoord moet minimaal 6 tekens lang zijn"
|
||||
},
|
||||
"checklist": {
|
||||
"add_item": "Artikel toevoegen",
|
||||
|
|
|
@ -275,7 +275,20 @@
|
|||
"completely_visited": "Całkowicie odwiedzone",
|
||||
"all_subregions": "Wszystkie podregiony",
|
||||
"clear_search": "Wyczyść wyszukiwanie",
|
||||
"no_countries_found": "Nie znaleziono krajów"
|
||||
"no_countries_found": "Nie znaleziono krajów",
|
||||
"all_visited": "Odwiedziłeś wszystkie regiony w",
|
||||
"cities": "miasta",
|
||||
"failed_to_mark_visit": "Nie udało się oznaczyć wizyty w",
|
||||
"failed_to_remove_visit": "Nie udało się usunąć wizyty w",
|
||||
"marked_visited": "oznaczone jako odwiedzone",
|
||||
"no_cities_found": "Nie znaleziono żadnych miast",
|
||||
"region_failed_visited": "Nie udało się oznaczyć regionu jako odwiedzony",
|
||||
"region_stats": "Statystyki regionu",
|
||||
"regions_in": "Regiony w",
|
||||
"removed": "REMOVED",
|
||||
"view_cities": "Zobacz Miasta",
|
||||
"visit_remove_failed": "Nie udało się usunąć wizyty",
|
||||
"visit_to": "Wizyta w"
|
||||
},
|
||||
"auth": {
|
||||
"username": "Nazwa użytkownika",
|
||||
|
@ -378,7 +391,9 @@
|
|||
"no_verified_email_warning": "Aby włączyć uwierzytelnianie dwuskładnikowe, musisz mieć zweryfikowany adres e-mail.",
|
||||
"social_auth_desc": "Włącz lub wyłącz dostawców uwierzytelniania społecznościowego i OIDC dla swojego konta. \nPołączenia te umożliwiają logowanie się za pośrednictwem dostawców tożsamości uwierzytelniających, takich jak Authentik, lub dostawców zewnętrznych, takich jak GitHub.",
|
||||
"social_auth_desc_2": "Ustawienia te są zarządzane na serwerze AdventureLog i muszą zostać włączone ręcznie przez administratora.",
|
||||
"social_oidc_auth": "Uwierzytelnianie społecznościowe i OIDC"
|
||||
"social_oidc_auth": "Uwierzytelnianie społecznościowe i OIDC",
|
||||
"add_email": "Dodaj e-mail",
|
||||
"password_too_short": "Hasło musi mieć co najmniej 6 znaków"
|
||||
},
|
||||
"collection": {
|
||||
"collection_created": "Kolekcja została pomyślnie utworzona!",
|
||||
|
|
|
@ -275,7 +275,20 @@
|
|||
"no_countries_found": "Inga länder hittades",
|
||||
"not_visited": "Ej besökta",
|
||||
"num_countries": "länder hittades",
|
||||
"partially_visited": "Delvis besökta"
|
||||
"partially_visited": "Delvis besökta",
|
||||
"all_visited": "Du har besökt alla regioner i",
|
||||
"cities": "städer",
|
||||
"failed_to_mark_visit": "Det gick inte att markera besök till",
|
||||
"failed_to_remove_visit": "Det gick inte att ta bort besök på",
|
||||
"marked_visited": "markerad som besökt",
|
||||
"no_cities_found": "Inga städer hittades",
|
||||
"region_failed_visited": "Det gick inte att markera regionen som besökt",
|
||||
"region_stats": "Regionstatistik",
|
||||
"regions_in": "Regioner i",
|
||||
"removed": "tas bort",
|
||||
"view_cities": "Visa städer",
|
||||
"visit_remove_failed": "Det gick inte att ta bort besöket",
|
||||
"visit_to": "Besök till"
|
||||
},
|
||||
"auth": {
|
||||
"confirm_password": "Bekräfta lösenord",
|
||||
|
@ -378,7 +391,9 @@
|
|||
"no_verified_email_warning": "Du måste ha en verifierad e-postadress för att aktivera tvåfaktorsautentisering.",
|
||||
"social_auth_desc": "Aktivera eller inaktivera sociala och OIDC-autentiseringsleverantörer för ditt konto. \nDessa anslutningar gör att du kan logga in med leverantörer av autentiseringsidentitetsidentitet som är värd för dig som Authentik eller tredjepartsleverantörer som GitHub.",
|
||||
"social_auth_desc_2": "Dessa inställningar hanteras i AdventureLog-servern och måste aktiveras manuellt av administratören.",
|
||||
"social_oidc_auth": "Social och OIDC-autentisering"
|
||||
"social_oidc_auth": "Social och OIDC-autentisering",
|
||||
"add_email": "Lägg till e-post",
|
||||
"password_too_short": "Lösenordet måste bestå av minst 6 tecken"
|
||||
},
|
||||
"checklist": {
|
||||
"add_item": "Lägg till objekt",
|
||||
|
|
|
@ -296,7 +296,20 @@
|
|||
"no_countries_found": "没有找到国家",
|
||||
"not_visited": "未访问过",
|
||||
"num_countries": "找到的国家",
|
||||
"partially_visited": "部分访问"
|
||||
"partially_visited": "部分访问",
|
||||
"all_visited": "您已访问过所有地区",
|
||||
"cities": "城市",
|
||||
"failed_to_mark_visit": "无法标记访问",
|
||||
"failed_to_remove_visit": "无法删除对的访问",
|
||||
"marked_visited": "标记为已访问",
|
||||
"no_cities_found": "没有找到城市",
|
||||
"region_failed_visited": "无法将区域标记为已访问",
|
||||
"region_stats": "地区统计",
|
||||
"regions_in": "地区位于",
|
||||
"removed": "已删除",
|
||||
"view_cities": "查看城市",
|
||||
"visit_remove_failed": "删除访问失败",
|
||||
"visit_to": "参观"
|
||||
},
|
||||
"users": {
|
||||
"no_users_found": "未找到具有公开个人资料的用户。"
|
||||
|
@ -378,7 +391,9 @@
|
|||
"no_verified_email_warning": "您必须拥有经过验证的电子邮件地址才能启用双因素身份验证。",
|
||||
"social_auth_desc": "为您的帐户启用或禁用社交和 OIDC 身份验证提供商。\n这些连接允许您使用自托管身份验证身份提供商(如 Authentik)或第三方提供商(如 GitHub)登录。",
|
||||
"social_auth_desc_2": "这些设置在 AdventureLog 服务器中进行管理,并且必须由管理员手动启用。",
|
||||
"social_oidc_auth": "社交和 OIDC 身份验证"
|
||||
"social_oidc_auth": "社交和 OIDC 身份验证",
|
||||
"add_email": "添加电子邮件",
|
||||
"password_too_short": "密码必须至少为 6 个字符"
|
||||
},
|
||||
"checklist": {
|
||||
"add_item": "添加项目",
|
||||
|
|
|
@ -194,10 +194,15 @@ export const actions: Actions = {
|
|||
if (password1 !== password2) {
|
||||
return fail(400, { message: 'settings.password_does_not_match' });
|
||||
}
|
||||
|
||||
if (!current_password) {
|
||||
current_password = null;
|
||||
}
|
||||
|
||||
if (password1 && password1?.length < 6) {
|
||||
return fail(400, { message: 'settings.password_too_short' });
|
||||
}
|
||||
|
||||
let csrfToken = await fetchCSRFToken();
|
||||
|
||||
if (current_password) {
|
||||
|
|
|
@ -345,6 +345,11 @@
|
|||
class="block w-full mt-1 input input-bordered input-primary"
|
||||
/>
|
||||
</div>
|
||||
{#if $page.form?.message}
|
||||
<div class="alert alert-warning">
|
||||
{$t($page.form?.message)}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div
|
||||
class="tooltip tooltip-warning"
|
||||
|
@ -394,7 +399,7 @@
|
|||
{/if}
|
||||
</div>
|
||||
|
||||
<form class="mt-4" on:submit={addEmail}>
|
||||
<form class="mt-4" on:submit|preventDefault={addEmail}>
|
||||
<input
|
||||
type="email"
|
||||
id="new_email"
|
||||
|
@ -403,7 +408,7 @@
|
|||
placeholder={$t('settings.new_email')}
|
||||
class="block w-full input input-bordered input-primary"
|
||||
/>
|
||||
<button class="w-full mt-4 btn btn-primary py-2">{$t('settings.email_change')}</button>
|
||||
<button class="w-full mt-4 btn btn-primary py-2">{$t('settings.add_email')}</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue