Reorganizace skeletonu, aktualizace app-vite a quasaru

This commit is contained in:
Michal Kváček
2023-12-10 10:19:03 +01:00
parent 68659ca924
commit 71389caecc
87 changed files with 1666 additions and 1368 deletions
@@ -1,7 +1,7 @@
<script setup>
import {useRoute, useRouter} from "vue-router";
import {computed, onMounted, ref, watch} from "vue";
import FlightDetailSkeleton from "components/flights/FlightDetailSkeleton.vue";
import FlightDetailSkeleton from "components/flights/skeletons/FlightDetailSkeleton.vue";
import {flightName} from "src/composables/flight";
import {useAppStore} from "stores/App";
import FlightBasicInfo from "components/flights/FlightBasicInfo.vue";
@@ -23,9 +23,10 @@ const $router = useRouter();
const flightId = parseInt(useRoute().params.id);
const loggedUser = storeToRefs(useUserStore()).user;
useFlightsStore().fetchDetail(flightId).then(f => {
useFlightsStore().fetchDetail(flightId);
const {isQueryRunning, flight} = storeToRefs(useFlightsStore());
watch(() => flight.value, (f) => {
if (!f) return;
const flightNameFormatted = flightName(f);
useAppStore().setPageTitle(flightNameFormatted);
useAppStore().setBreadcrumbs([
@@ -60,8 +61,6 @@ const copyLinkToClipboard = () => {
$q.notify(successObject("Odkaz zkopírován"))
});
};
const {isQueryRunning, flight} = storeToRefs(useFlightsStore());
</script>
<template>
@@ -98,6 +97,7 @@ const {isQueryRunning, flight} = storeToRefs(useFlightsStore());
/>
<FlightBasicInfo
:flight="flight"
:poi-detail-route="{name: 'poiDetail'}"
:aircraft-detail-route="{name: 'aircraftDetail'}"
:copilot-detail-route="{name: 'copilotDetail'}"
/>