login page + i18n
This commit is contained in:
parent
918d81b03f
commit
638ed31b09
|
@ -14,6 +14,9 @@
|
||||||
"title": "Log in to your account",
|
"title": "Log in to your account",
|
||||||
"subtitle": "We'll send you an email with a \"magic link\".",
|
"subtitle": "We'll send you an email with a \"magic link\".",
|
||||||
"prompt": "What's your email?",
|
"prompt": "What's your email?",
|
||||||
"actionButtonText": "Log in"
|
"actionButtonText": "Log in",
|
||||||
|
"apierror": {
|
||||||
|
"authorization was provided but it is expired or invalid": "User does not exist, maybe consider creating an account?"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -9,5 +9,14 @@
|
||||||
"lightMode": "ライトモード",
|
"lightMode": "ライトモード",
|
||||||
"darkMode": "ダークモード",
|
"darkMode": "ダークモード",
|
||||||
"changeLang": "言語の変更"
|
"changeLang": "言語の変更"
|
||||||
|
},
|
||||||
|
"login": {
|
||||||
|
"title": "あなたのアカウントにログイン",
|
||||||
|
"subtitle": "「マジックリンク」を記載したメールをお送りします。",
|
||||||
|
"prompt": "あなたのメールは何ですか?",
|
||||||
|
"actionButtonText": "ログイン",
|
||||||
|
"apierror": {
|
||||||
|
"authorization was provided but it is expired or invalid": "ユーザーが存在しません。アカウントの作成を検討してください。"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -9,5 +9,14 @@
|
||||||
"lightMode": "Lichtmodus",
|
"lightMode": "Lichtmodus",
|
||||||
"darkMode": "Donkere modus",
|
"darkMode": "Donkere modus",
|
||||||
"changeLang": "Taal wijzigen"
|
"changeLang": "Taal wijzigen"
|
||||||
|
},
|
||||||
|
"login": {
|
||||||
|
"title": "Log in op jouw account",
|
||||||
|
"subtitle": "We sturen je een e-mail met een \"magische link\".",
|
||||||
|
"prompt": "Wat is jouw e-mail?",
|
||||||
|
"actionButtonText": "Log in",
|
||||||
|
"apierror": {
|
||||||
|
"authorization was provided but it is expired or invalid": "Gebruiker bestaat niet, misschien overwegen om een account aan te maken?"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -25,7 +25,10 @@
|
||||||
if (xhr.status != 200) {
|
if (xhr.status != 200) {
|
||||||
// error
|
// error
|
||||||
hasError = true;
|
hasError = true;
|
||||||
error = JSON.parse(xhr.responseText).errors[0].message;
|
const rawerror = JSON.parse(xhr.responseText).errors[0].message;
|
||||||
|
|
||||||
|
error = t(`login.apierror.${rawerror}`);
|
||||||
|
|
||||||
isloading = false;
|
isloading = false;
|
||||||
} else {
|
} else {
|
||||||
isloading = false;
|
isloading = false;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
listen_port = 8000
|
listen_port = 8000
|
||||||
db_url = "postgres://postgres@localhost/trifidapi"
|
db_url = "postgres://postgres@localhost/trifidapi"
|
||||||
base = "http://localhost:8000"
|
base = "http://localhost:8000"
|
||||||
web_root = "http://localhost:5173
|
web_root = "http://localhost:5173"
|
||||||
magic_links_valid_for = 86400
|
magic_links_valid_for = 86400
|
||||||
session_tokens_valid_for = 86400
|
session_tokens_valid_for = 86400
|
||||||
totp_verification_valid_for = 3600
|
totp_verification_valid_for = 3600
|
Loading…
Reference in New Issue