diff --git a/src/static/app/src/css/dashboard.css b/src/static/app/src/css/dashboard.css
index 553ddac..e8df353 100644
--- a/src/static/app/src/css/dashboard.css
+++ b/src/static/app/src/css/dashboard.css
@@ -556,13 +556,6 @@ main {
/*padding: 0.6rem 0.9em;*/
}
-.login-box #username,
-.login-box #password,
-.login-box #totp
-{
- padding: 0.6rem calc( 0.9rem + 32px);
- height: inherit;
-}
.login-box label[for="username"],
.login-box label[for="password"],
diff --git a/src/static/app/src/views/signin.vue b/src/static/app/src/views/signin.vue
index 4b3aab0..9f1e61a 100644
--- a/src/static/app/src/views/signin.vue
+++ b/src/static/app/src/views/signin.vue
@@ -50,12 +50,15 @@ export default {
},
applyLocale(key){
return GetLocale(key)
+ },
+ formValid(){
+ return this.data.username && this.data.password && ((this.totpEnabled && this.data.totp) || !this.totpEnabled)
}
},
methods: {
GetLocale,
async auth(){
- if (this.data.username && this.data.password && ((this.totpEnabled && this.data.totp) || !this.totpEnabled)){
+ if (this.formValid){
this.loading = true
await fetchPost("/api/authenticate", this.data, (response) => {
if (response.status){
@@ -71,8 +74,7 @@ export default {
}
}
}else{
- this.loginError = true;
- this.loginErrorMessage = response.message;
+ this.store.newMessage("Server", response.message, "danger")
document.querySelectorAll("input[required]").forEach(x => {
x.classList.remove("is-valid")
x.classList.add("is-invalid")
@@ -107,28 +109,53 @@ export default {