Description projektu, drobna uprava skeletonu pro editaci letu

This commit is contained in:
Michal Kváček
2023-09-18 09:00:03 +02:00
parent e203a7d229
commit b6a6fc3558
7 changed files with 55 additions and 5432 deletions
-5400
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "app",
"version": "0.0.1",
"description": "A Quasar Project",
"description": "Fotogalerie pro tvoje zážitky ze vzduchu",
"productName": "Polétání.cz",
"author": "Michal Kváček <michal@kvacek.cz>",
"private": true,
+2 -1
View File
@@ -91,9 +91,10 @@ const props = defineProps({
<q-icon name="people"/>
</q-item-section>
<q-item-section>
<router-link :to="{name: 'copilotDetail', params: {id: copilot.id}}">
<router-link :to="{name: 'copilotDetail', params: {id: copilot.id}}" v-if="showCopilots">
{{ copilot.name }}
</router-link>
<template v-else> {{ copilot.name }}</template>
</q-item-section>
</q-item>
</q-list>
+27 -11
View File
@@ -1,20 +1,36 @@
<script setup>
import {randomInt} from "src/composables/random";
import BasicTextSkeleton from "components/basicSkeletons/BasicTextSkeleton.vue";
import BasicListSkeleton from "components/basicSkeletons/BasicListSkeleton.vue";
const props = defineProps({
step: {
type: String,
required: true
},
})
</script>
<template>
<q-card class="flight-detail-card">
<q-skeleton type="rect" height="400px"/>
<q-card class="" v-if="step !== 'photos'">
<q-card-section>
<q-skeleton type="QInput" v-for="i in 3" :key="i" />
<q-skeleton type="QInput" class="q-my-sm" v-for="i in 3" :key="i"/>
</q-card-section>
</q-card>
<q-card class="flight-detail-card" flat>
<BasicListSkeleton :items-count-min="1" :items-count-max="4"/>
</q-card></template>
<template v-if="step === 'photos'">
<q-card>
<q-card-section>
<q-skeleton type="QInput" class="q-my-sm"/>
</q-card-section>
</q-card>
<q-card v-for="i in randomInt(3, 10)" :key="i">
<q-skeleton type="rect"/>
</q-card>
</template>
</template>
+21 -15
View File
@@ -18,14 +18,18 @@ const poisWithGPS = computed(() => {
});
const pointsOfInterests = computed(() => {
const path = [{
label: flight.value.takeoffAirport.name,
position:
{
lat: flight.value.takeoffAirport.gpsLatitude,
lng: flight.value.takeoffAirport.gpsLongitude
}
}];
const path = [];
if (flight.value.takeoffAirport.gpsLatitude && flight.value.takeoffAirport.gpsLongitude) {
path.push({
label: flight.value.takeoffAirport.name,
position:
{
lat: flight.value.takeoffAirport.gpsLatitude,
lng: flight.value.takeoffAirport.gpsLongitude
}
});
}
for (const poi of poisWithGPS.value) {
path.push({
@@ -34,13 +38,15 @@ const pointsOfInterests = computed(() => {
});
}
path.push({
label: flight.value.landingAirport.name,
position: {
lat: flight.value.landingAirport.gpsLatitude,
lng: flight.value.landingAirport.gpsLongitude
}
});
if (flight.value.landingAirport.gpsLatitude && flight.value.landingAirport.gpsLongitude) {
path.push({
label: flight.value.landingAirport.name,
position: {
lat: flight.value.landingAirport.gpsLatitude,
lng: flight.value.landingAirport.gpsLongitude
}
});
}
return path;
});
+1 -1
View File
@@ -10,7 +10,7 @@ const props = defineProps({
})
const kmhToKnots = (speedKmh) => {
return Math.round(speedKmh / 0.53996);
return Math.round(speedKmh * 0.53996);
}
const openDetail = ref(false);
+3 -3
View File
@@ -103,11 +103,11 @@ const deletePhoto = (id) => {
</script>
<template>
<FlightEditSkeleton v-if="loading"/>
<FlightFormSteps :router-edit-mode="true" :flightId="flightId"/>
<FlightEditSkeleton :step="formStep" v-if="loading"/>
<template v-else>
<FlightFormSteps :router-edit-mode="true" :flightId="flightId"/>
<q-tab-panels v-model="formStep">
<q-tab-panel name="basic">
<FlightFormBasic