new package dbHandler accesscontrol memeberdb and login with rights
All checks were successful
Build Quasar SPA and Go Backend for memberApp / build-spa (push) Successful in 2m20s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, .exe, windows) (push) Successful in 5m27s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, , linux) (push) Successful in 5m32s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm, 6, , linux) (push) Successful in 5m28s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm64, , linux) (push) Successful in 5m29s

This commit is contained in:
Adrian Zürcher
2025-10-31 14:54:05 +01:00
parent b0d6bb5512
commit cc3a547961
60 changed files with 1062 additions and 1162 deletions

View File

@@ -8,6 +8,7 @@
ref="refUserInput"
dense
filled
autocomplete="username"
type="text"
:label="$t('user')"
v-model="user"
@@ -16,6 +17,7 @@
<q-input
dense
filled
autocomplete="current-password"
:type="showPassword ? 'text' : 'password'"
:label="$t('password')"
v-model="password"
@@ -27,14 +29,17 @@
flat
dense
:icon="showPassword ? 'visibility_off' : 'visibility'"
@mousedown.left="showPassword = true"
@mouseup.left="showPassword = false"
@mouseleave="showPassword = false"
@mousedown.prevent="showPassword = true"
@mouseup.prevent="showPassword = false"
@mouseleave.prevent="showPassword = false"
@touchstart.prevent="showPassword = true"
@touchend.prevent="showPassword = false"
@touchcancel.prevent="showPassword = false"
></q-btn>
</template>
</q-input>
<div class="q-pt-sm q-mr-md row justify-end">
<q-btn color="primary" :label="$t('login')" @click="onSubmit"></q-btn>
<q-btn no-caps color="primary" :label="$t('login')" @click="onSubmit"></q-btn>
</div>
</q-card>
</q-item-section>
@@ -59,25 +64,24 @@ const { login } = useLogin();
const emit = defineEmits(['update-close']);
const onSubmit = () => {
refForm.value?.validate().then((success: boolean) => {
if (success) {
login(user.value, password.value)
.then(() => {
NotifyResponse("logged in as '" + user.value + "'");
emit('update-close');
})
.catch((err) => {
NotifyResponse(err, 'error');
shake.value = true;
setTimeout(() => {
shake.value = false;
}, 500);
});
} else {
NotifyResponse('error submitting login form', 'error');
}
});
const onSubmit = async () => {
const valid = refForm.value?.validate();
if (!valid) {
NotifyResponse('error submitting login form', 'error');
return;
}
await login(user.value, password.value)
.then(() => {
NotifyResponse("logged in as '" + user.value + "'");
})
.catch((err) => {
NotifyResponse(err, 'error');
shake.value = true;
setTimeout(() => {
shake.value = false;
}, 500);
});
emit('update-close');
};
</script>