fix: show login failed error message
This commit is contained in:
parent
3717a34da6
commit
15a2963f7e
3 changed files with 8 additions and 1 deletions
|
|
@ -58,6 +58,7 @@
|
||||||
"hint_move": "Click a highlighted field to move a checker",
|
"hint_move": "Click a highlighted field to move a checker",
|
||||||
"hint_hold_or_go": "Hold to keep points — Go to reset the setting",
|
"hint_hold_or_go": "Hold to keep points — Go to reset the setting",
|
||||||
"hint_continue": "Click Continue when ready",
|
"hint_continue": "Click Continue when ready",
|
||||||
|
"login_failed": "Invalid username or password.",
|
||||||
"sign_in": "Sign in",
|
"sign_in": "Sign in",
|
||||||
"sign_out": "Sign out",
|
"sign_out": "Sign out",
|
||||||
"create_account": "Create account",
|
"create_account": "Create account",
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@
|
||||||
"hint_move": "Cliquez un champ surligné pour déplacer",
|
"hint_move": "Cliquez un champ surligné pour déplacer",
|
||||||
"hint_hold_or_go": "Tenir pour garder les points — S'en aller pour repartir",
|
"hint_hold_or_go": "Tenir pour garder les points — S'en aller pour repartir",
|
||||||
"hint_continue": "Cliquez Continuer quand vous êtes prêt",
|
"hint_continue": "Cliquez Continuer quand vous êtes prêt",
|
||||||
|
"login_failed": "Identifiant ou mot de passe incorrect.",
|
||||||
"sign_in": "Se connecter",
|
"sign_in": "Se connecter",
|
||||||
"sign_out": "Se déconnecter",
|
"sign_out": "Se déconnecter",
|
||||||
"create_account": "Créer un compte",
|
"create_account": "Créer un compte",
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,12 @@ fn LoginForm() -> impl IntoView {
|
||||||
navigate(&dest, Default::default());
|
navigate(&dest, Default::default());
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error.set(e);
|
let msg = if e.is_empty() {
|
||||||
|
t_string!(i18n, login_failed).to_string()
|
||||||
|
} else {
|
||||||
|
e
|
||||||
|
};
|
||||||
|
error.set(msg);
|
||||||
pending.set(false);
|
pending.set(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue