Add token invalid error message. Closes #12.
This commit is contained in:
parent
e3831e7ee1
commit
7bbd1e26ba
|
@ -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) {
|
||||
|
|
1
src/translations/en.js
vendored
1
src/translations/en.js
vendored
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue