Upravy UI, refaktoring, davkove upravy a mazani fotek

This commit is contained in:
Michal Kváček
2023-08-28 22:02:24 +02:00
parent dcc3230cbe
commit dd248d4432
53 changed files with 636 additions and 357 deletions
+11 -5
View File
@@ -2,6 +2,7 @@
import {ref} from "vue";
import {useUserStore} from "stores/User";
import {useRouter} from "vue-router";
import {isRequired, isValidEmail, minLength} from "src/composables/form/rules";
const email = ref("");
const password = ref("");
@@ -12,6 +13,11 @@ const logUser = () => {
router.push({name: "myFlights"});
});
};
const rules = {
email: [isRequired, isValidEmail],
password: [isRequired, minLength(4)]
}
</script>
<template>
@@ -25,12 +31,12 @@ const logUser = () => {
</q-card-section>
<q-card-section>
<q-form class="q-px-sm q-pt-xl" @submit.prevent="logUser()">
<q-input square clearable v-model="email" type="email" label="Email">
<q-input square clearable v-model="email" :rules="rules.email" type="email" label="E-mail">
<template v-slot:prepend>
<q-icon name="email"/>
</template>
</q-input>
<q-input square clearable v-model="password" type="password" label="Password">
<q-input square clearable v-model="password" :rules="rules.password" type="password" label="Password">
<template v-slot:prepend>
<q-icon name="lock"/>
</template>
@@ -41,9 +47,9 @@ const logUser = () => {
<q-card-actions class="q-px-lg">
<q-btn unelevated size="lg" class="full-width" label="Přihlásit se" @click.prevent="logUser()"/>
</q-card-actions>
<q-card-section class="text-center q-pa-sm">
<router-link :to="{name: 'forgottenPassword'}" class="text-grey-6">Zapomenuté heslo</router-link>
</q-card-section>
<!-- <q-card-section class="text-center q-pa-sm">-->
<!-- <router-link :to="{name: 'forgottenPassword'}" class="text-grey-6">Zapomenuté heslo</router-link>-->
<!-- </q-card-section>-->
</q-card>
</q-page>