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");
|
changePage("HOME");
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
document.getElementById("tokenInput").classList.add("uk-form-danger");
|
document.getElementById("tokenInput").classList.add("uk-form-danger");
|
||||||
|
if (e.message == "permission denied") {
|
||||||
|
setErrorText(i18next.t("token_login_error"));
|
||||||
|
} else {
|
||||||
setErrorText(e.message);
|
setErrorText(e.message);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
usernameLoginForm.addEventListener("submit", function (e) {
|
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",
|
"username_input": "Username",
|
||||||
"password_input": "Password",
|
"password_input": "Password",
|
||||||
"log_in_btn": "Login",
|
"log_in_btn": "Login",
|
||||||
|
"token_login_error": "Invalid Token",
|
||||||
|
|
||||||
// Key Value Delete Page
|
// Key Value Delete Page
|
||||||
"kv_delete_title": "K/V Delete",
|
"kv_delete_title": "K/V Delete",
|
||||||
|
|
Loading…
Reference in a new issue