1
0
Fork 0

Add token invalid error message. Closes #12.

This commit is contained in:
Kitteh 2021-05-09 10:11:20 +01:00
parent e3831e7ee1
commit 7bbd1e26ba
2 changed files with 6 additions and 1 deletions

View file

@ -129,7 +129,11 @@ export class LoginPage extends Page {
changePage("HOME");
}).catch(e => {
document.getElementById("tokenInput").classList.add("uk-form-danger");
setErrorText(e.message);
if (e.message == "permission denied") {
setErrorText(i18next.t("token_login_error"));
} else {
setErrorText(e.message);
}
});
});
usernameLoginForm.addEventListener("submit", function (e) {

View file

@ -60,6 +60,7 @@ module.exports = {
"username_input": "Username",
"password_input": "Password",
"log_in_btn": "Login",
"token_login_error": "Invalid Token",
// Key Value Delete Page
"kv_delete_title": "K/V Delete",