Zobrazeni linku na event u detailu letu
This commit is contained in:
@@ -19,9 +19,10 @@ import PhotoGallery from "components/photos/PhotoGallery.vue";
|
||||
import {storeToRefs} from "pinia";
|
||||
import {flightName} from "src/composables/flight";
|
||||
import {useMeta} from "quasar";
|
||||
import {aircraftKeywords, metaData} from "src/composables/meta";
|
||||
import {aircraftKeywords, flightEventKeywords, flightKeywords, metaData} from "src/composables/meta";
|
||||
import ContentCard from "components/ContentCard.vue";
|
||||
import {usePhotosStore} from "stores/Photos";
|
||||
import {computed} from "vue";
|
||||
|
||||
const {isQueryRunning, flight} = storeToRefs(useFlightsStore());
|
||||
|
||||
@@ -37,15 +38,32 @@ const {isQueryRunning: arePhotosLoading, photos: flightPhotos} = storeToRefs(use
|
||||
|
||||
const flightNameFormatted = flightName(flight.value);
|
||||
useAppStore().setPageTitle(flightNameFormatted);
|
||||
useAppStore().setBreadcrumbs([
|
||||
|
||||
const event = computed(() => flight.value.event);
|
||||
const breadcrumbs = [
|
||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
||||
{to: {name: "publicProfileDetail", params: {username: props.pilot.publicUsername}}, label: `@${props.pilot.publicUsername}`},
|
||||
{label: flightNameFormatted}
|
||||
]);
|
||||
]
|
||||
if (event.value && event.value.isPublic) {
|
||||
breadcrumbs.push({to: {name: 'publicEventsList', username: props.pilot.publicUsername}, label: "Události"});
|
||||
breadcrumbs.push({
|
||||
to: {
|
||||
name: 'publicEventDetail',
|
||||
params: {eventSlug: event.value.urlSlug, username: props.pilot.publicUsername}
|
||||
}, label: event.value.name
|
||||
});
|
||||
}
|
||||
breadcrumbs.push({label: flightNameFormatted})
|
||||
useAppStore().setBreadcrumbs(breadcrumbs);
|
||||
|
||||
useMeta(() => metaData({
|
||||
title: `${flightNameFormatted} - ${props.pilot.name}`,
|
||||
keywords: ["let", "výlet", "letadlo", props.pilot.name, ...aircraftKeywords(flight.value.aircraft)],
|
||||
keywords: [
|
||||
...flightKeywords(flight.value),
|
||||
props.pilot.name,
|
||||
...aircraftKeywords(flight.value.aircraft),
|
||||
...flightEventKeywords(event.value)
|
||||
],
|
||||
description: flight.value.description,
|
||||
image: flight.value.titlePhoto?.url
|
||||
}
|
||||
@@ -63,6 +81,7 @@ useMeta(() => metaData({
|
||||
:flight="flight"
|
||||
:poi-detail-route="{name: 'publicPOIDetail'}"
|
||||
:aircraft-detail-route="{name: 'publicAircraftDetail'}"
|
||||
:event-detail-route="event.isPublic ? {name: 'publicEventDetail', params: {username: pilot.publicUsername, eventSlug: event.urlSlug}} : null"
|
||||
:copilot-detail-route="{name: 'publicCopilotDetail', params: {username: pilot.publicUsername}}"
|
||||
/>
|
||||
|
||||
@@ -71,9 +90,8 @@ useMeta(() => metaData({
|
||||
<q-no-ssr>
|
||||
<q-inner-loading v-if="arePhotosLoading"/>
|
||||
<PhotoGallery :photos="flightPhotos" v-else/>
|
||||
<FlightTrackMap :key="flight.id" :flight="flight" :photos="flightPhotos"/>
|
||||
</q-no-ssr>
|
||||
|
||||
<FlightTrackMap :key="flight.id" :flight="flight" :photos="flightPhotos"/>
|
||||
</q-card-section>
|
||||
</template>
|
||||
</ContentCard>
|
||||
|
||||
Reference in New Issue
Block a user