Uprava setovani 404 (asi porad nefunguje), ruzne podminky, priprava na zapomenute heslo, sjednoceni nacitani letu v profilu
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
<script setup>
|
||||
import {reactive} from "vue";
|
||||
import {reactive, ref} from "vue";
|
||||
import {useRouter} from "vue-router";
|
||||
import {isRequired, isValidEmail, minLength} from "src/composables/form/rules";
|
||||
import {useQuasar} from "quasar";
|
||||
import {useMeta, useQuasar} from "quasar";
|
||||
import {errorObject} from "src/composables/dialog";
|
||||
import {useAuthStore} from "stores/Auth";
|
||||
import {useAppStore} from "stores/App";
|
||||
import {metaData} from "src/composables/meta";
|
||||
|
||||
const $router = useRouter();
|
||||
const $q = useQuasar();
|
||||
|
||||
useAppStore().setPageTitle("Přihlášení");
|
||||
useMeta(() => metaData({
|
||||
title: "Přihlášení",
|
||||
}));
|
||||
|
||||
const logUser = () => {
|
||||
useAuthStore().login(formData).then(() => {
|
||||
$router.push({name: "myFlights"});
|
||||
}).catch((err) => {
|
||||
$q.notify(errorObject(`Přihlášení se nezdařilo. ${err}`))
|
||||
$q.notify(errorObject(`Přihlášení se nezdařilo.`))
|
||||
})
|
||||
};
|
||||
|
||||
@@ -32,7 +39,7 @@ const formData = reactive({
|
||||
<q-page-container>
|
||||
|
||||
<q-page class="window-height window-width row justify-center">
|
||||
<q-card square style="width:95%; max-width: 450px; height:400px;" class="q-mt-lg">
|
||||
<q-card square flat style="width:95%; max-width: 450px;" class="q-mt-lg">
|
||||
<q-card-section class="bg-primary">
|
||||
<h4 class="text-h5 q-my-md text-white">Login</h4>
|
||||
</q-card-section>
|
||||
@@ -52,11 +59,11 @@ const formData = reactive({
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions class="q-px-lg">
|
||||
<q-btn unelevated size="lg" class="full-width" label="Přihlásit se" @click.prevent="logUser()"/>
|
||||
<q-btn unelevated size="lg" color="primary" 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>
|
||||
|
||||
Reference in New Issue
Block a user