Planovac, lepsi social image

This commit is contained in:
Michal Kváček
2024-06-03 23:07:41 +02:00
parent 32ff47a3a7
commit 70bc57d3c7
10 changed files with 32 additions and 30 deletions
+3 -2
View File
@@ -112,7 +112,7 @@ const openBatchPhotoForm = (photos) => {
editBatchPhotos.value = photos;
}
const handleBatchPhotoEdit = async (flightId, data) => {
const handleBatchPhotoEdit = async (data) => {
const photoIds = data.photoIds;
delete data.photoIds;
delete data.id;
@@ -122,6 +122,7 @@ const handleBatchPhotoEdit = async (flightId, data) => {
...data.pointOfInterest,
isPublic: false,
description: "",
urlSlug: "",
}
await usePointsOfInterestStore().create(poiData).then(poi => data.pointOfInterest = {id: poi.id, name: poi.name});
}
@@ -223,7 +224,7 @@ const handleBatchPhotoEdit = async (flightId, data) => {
:photos="editBatchPhotos"
:copilots="flight.copilots"
:aircrafts="aircrafts"
@save="handleBatchPhotoEdit(flightId, $event)"
@save="handleBatchPhotoEdit"
@delete="deletePhoto"
/>
@@ -50,7 +50,7 @@ const handleDeleteAndRedirect = () => {
.onOk(() => {
useFlightsStore().destroy(flightId).then(() => {
$router.push({name: "myFlights"});
$q.notify(successObject(`Úspěšně smazáno`));
$q.notify(successObject('Úspěšně smazáno'));
});
});
};
@@ -106,7 +106,6 @@ const fullscreen = ref(false);
Informace
</q-tab>
</q-tabs>
<q-tab-panels v-model="openedTab">
<q-tab-panel name="route">
<div :class="{row: true, fullscreen}">
@@ -137,7 +136,6 @@ const fullscreen = ref(false);
<q-tab-panel name="info">
<div class="row">
<div class="col">
<FormWrapper v-model="formData" @save="handleFlightPlanInfoSave">
<q-input v-model="formData.name" label="Jméno letu" v-if="!formData.isDefaultName" v-bind="commonProps"/>
@@ -22,7 +22,7 @@ import {useMeta} from "quasar";
import {aircraftKeywords, flightEventKeywords, flightKeywords, metaData} from "src/composables/meta";
import ContentCard from "components/ContentCard.vue";
import {usePhotosStore} from "stores/Photos";
import {computed} from "vue";
import {computed, onMounted} from "vue";
import {publicFlightBreadcrumbs} from "src/composables/breadcrumbs";
const {isQueryRunning, flight} = storeToRefs(useFlightsStore());
@@ -34,7 +34,9 @@ const props = defineProps({
}
});
usePhotosStore().fetchPublic({flightId: flight.value.id});
onMounted(() => {
usePhotosStore().fetchPublic({flightId: flight.value.id});
})
const {isQueryRunning: arePhotosLoading, photos: flightPhotos} = storeToRefs(usePhotosStore());
const flightNameFormatted = flightName(flight.value);
@@ -52,7 +54,7 @@ useMeta(() => metaData({
...flightEventKeywords(event.value)
],
description: flight.value.description,
image: flight.value.titlePhoto?.url
image: flight.value.socialImageUrl
}
));
</script>
@@ -22,7 +22,7 @@ useMeta(() => metaData({
title: `${props.pilot.publicUsername} - Lety`,
keywords: [...commonKeywords, "pilot", props.pilot.publicUsername, props.pilot.name],
description: `Výlety publikované pilotem ${props.pilot.name}. ${props.pilot.publicUsername}: ${props.pilot.description}`,
image: props.pilot.titleImageUrl
image: props.pilot.socialImageUrl
}));
useAppStore().setPageTitle(props.pilot.publicUsername);