Planovac, lepsi social image
This commit is contained in:
@@ -81,7 +81,7 @@ const handleMarkerMove = async (idx, event) => {
|
|||||||
<template>
|
<template>
|
||||||
<MapWrapper
|
<MapWrapper
|
||||||
ref="mapWrap"
|
ref="mapWrap"
|
||||||
style="width: 100%; height: 100%; min-height: 500px"
|
style="width: 100%; height: 65vh; min-height: 500px"
|
||||||
:center="center"
|
:center="center"
|
||||||
:zoom="8"
|
:zoom="8"
|
||||||
:track="{path: track, geodesic: true, strokeColor: '#ff00ff', strokeOpacity: 1, strokeWeight: 3}"
|
:track="{path: track, geodesic: true, strokeColor: '#ff00ff', strokeOpacity: 1, strokeWeight: 3}"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const totalTime = computed(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-list bordered class="q-ml-md-md q-pt-md">
|
<q-list bordered class="q-ml-md-md q-pt-md">
|
||||||
<q-item>
|
<q-item class="mobile-hide">
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<div style="display: flex; justify-content: space-between">
|
<div style="display: flex; justify-content: space-between">
|
||||||
<q-btn
|
<q-btn
|
||||||
@@ -65,7 +65,7 @@ const totalTime = computed(() => {
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-scroll-area style="height: 50vh">
|
<q-scroll-area class="mobile-hide" style="height: 55vh">
|
||||||
<template v-for="(segment, i) in props.flightPlan.track" :key="segment">
|
<template v-for="(segment, i) in props.flightPlan.track" :key="segment">
|
||||||
<q-item dense>
|
<q-item dense>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
@@ -114,7 +114,7 @@ const totalTime = computed(() => {
|
|||||||
</q-scroll-area>
|
</q-scroll-area>
|
||||||
|
|
||||||
<template v-if="totalDistance">
|
<template v-if="totalDistance">
|
||||||
<q-item>
|
<q-item class="mobile-hide">
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-separator/>
|
<q-separator/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ const isControlsOpened = ref(false);
|
|||||||
@click="handleMapClick"
|
@click="handleMapClick"
|
||||||
map-type-id="roadmap"
|
map-type-id="roadmap"
|
||||||
gesture-handling="greedy"
|
gesture-handling="greedy"
|
||||||
:max-zoom="13"
|
:max-zoom="11"
|
||||||
ref="mapRef"
|
ref="mapRef"
|
||||||
>
|
>
|
||||||
<AirspaceInfoWindow
|
<AirspaceInfoWindow
|
||||||
@@ -289,6 +289,7 @@ const isControlsOpened = ref(false);
|
|||||||
▲
|
▲
|
||||||
</CustomMarker>
|
</CustomMarker>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-for="poi in pointsOfInterest" :key="poi.name">
|
<template v-for="poi in pointsOfInterest" :key="poi.name">
|
||||||
<CustomMarker
|
<CustomMarker
|
||||||
@@ -297,16 +298,14 @@ const isControlsOpened = ref(false);
|
|||||||
@click.stop="handlePoiClick(poi)"
|
@click.stop="handlePoiClick(poi)"
|
||||||
>
|
>
|
||||||
<div style="padding: 5px; border-radius: 15px; background: #8bdfff">
|
<div style="padding: 5px; border-radius: 15px; background: #8bdfff">
|
||||||
<img style="width: 20px" src="/public/mapIcons/photo-32x32.png" alt="">
|
<img style="width: 20px" src="/mapIcons/photo-32x32.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
</CustomMarker>
|
</CustomMarker>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<Polyline v-if="track" :options="track"/>
|
<Polyline v-if="track" :options="track"/>
|
||||||
</template>
|
|
||||||
|
|
||||||
|
<CustomControl position="BOTTOM" v-if="showLayerControls" style="width: auto; max-width: 200px">
|
||||||
<CustomControl position="BOTTOM_LEFT" v-if="showLayerControls" style="width: 30%">
|
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="isControlsOpened = !isControlsOpened"
|
@click="isControlsOpened = !isControlsOpened"
|
||||||
:icon="isControlsOpened ? 'layers_clear' : 'layers'"
|
:icon="isControlsOpened ? 'layers_clear' : 'layers'"
|
||||||
@@ -320,8 +319,8 @@ const isControlsOpened = ref(false);
|
|||||||
<q-card
|
<q-card
|
||||||
v-if="isControlsOpened"
|
v-if="isControlsOpened"
|
||||||
class="q-my-md q-mx-auto q-px-lg"
|
class="q-my-md q-mx-auto q-px-lg"
|
||||||
|
style="max-width: 30%; min-width: 200px;"
|
||||||
>
|
>
|
||||||
|
|
||||||
<template v-for="(airspaceLayer, key) in airspaceLayers" :key="airspaceLayer">
|
<template v-for="(airspaceLayer, key) in airspaceLayers" :key="airspaceLayer">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="airspaceLayers[key].displayed"
|
v-model="airspaceLayers[key].displayed"
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ fragment flightFullInfo on Flight {
|
|||||||
durationMinCalculated
|
durationMinCalculated
|
||||||
isPublic
|
isPublic
|
||||||
|
|
||||||
|
socialImageUrl
|
||||||
titlePhoto {
|
titlePhoto {
|
||||||
thumbnailUrl
|
thumbnailUrl
|
||||||
url
|
url
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export const FRAGMENT_USER_FULL_INFO = gql`
|
|||||||
email
|
email
|
||||||
avatarImageUrl
|
avatarImageUrl
|
||||||
titleImageUrl
|
titleImageUrl
|
||||||
|
socialImageUrl
|
||||||
publicUsername
|
publicUsername
|
||||||
description
|
description
|
||||||
createdAt
|
createdAt
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ const openBatchPhotoForm = (photos) => {
|
|||||||
editBatchPhotos.value = photos;
|
editBatchPhotos.value = photos;
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleBatchPhotoEdit = async (flightId, data) => {
|
const handleBatchPhotoEdit = async (data) => {
|
||||||
const photoIds = data.photoIds;
|
const photoIds = data.photoIds;
|
||||||
delete data.photoIds;
|
delete data.photoIds;
|
||||||
delete data.id;
|
delete data.id;
|
||||||
@@ -122,6 +122,7 @@ const handleBatchPhotoEdit = async (flightId, data) => {
|
|||||||
...data.pointOfInterest,
|
...data.pointOfInterest,
|
||||||
isPublic: false,
|
isPublic: false,
|
||||||
description: "",
|
description: "",
|
||||||
|
urlSlug: "",
|
||||||
}
|
}
|
||||||
await usePointsOfInterestStore().create(poiData).then(poi => data.pointOfInterest = {id: poi.id, name: poi.name});
|
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"
|
:photos="editBatchPhotos"
|
||||||
:copilots="flight.copilots"
|
:copilots="flight.copilots"
|
||||||
:aircrafts="aircrafts"
|
:aircrafts="aircrafts"
|
||||||
@save="handleBatchPhotoEdit(flightId, $event)"
|
@save="handleBatchPhotoEdit"
|
||||||
@delete="deletePhoto"
|
@delete="deletePhoto"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ const handleDeleteAndRedirect = () => {
|
|||||||
.onOk(() => {
|
.onOk(() => {
|
||||||
useFlightsStore().destroy(flightId).then(() => {
|
useFlightsStore().destroy(flightId).then(() => {
|
||||||
$router.push({name: "myFlights"});
|
$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
|
Informace
|
||||||
</q-tab>
|
</q-tab>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
|
|
||||||
<q-tab-panels v-model="openedTab">
|
<q-tab-panels v-model="openedTab">
|
||||||
<q-tab-panel name="route">
|
<q-tab-panel name="route">
|
||||||
<div :class="{row: true, fullscreen}">
|
<div :class="{row: true, fullscreen}">
|
||||||
@@ -137,7 +136,6 @@ const fullscreen = ref(false);
|
|||||||
<q-tab-panel name="info">
|
<q-tab-panel name="info">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
||||||
<FormWrapper v-model="formData" @save="handleFlightPlanInfoSave">
|
<FormWrapper v-model="formData" @save="handleFlightPlanInfoSave">
|
||||||
<q-input v-model="formData.name" label="Jméno letu" v-if="!formData.isDefaultName" v-bind="commonProps"/>
|
<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 {aircraftKeywords, flightEventKeywords, flightKeywords, metaData} from "src/composables/meta";
|
||||||
import ContentCard from "components/ContentCard.vue";
|
import ContentCard from "components/ContentCard.vue";
|
||||||
import {usePhotosStore} from "stores/Photos";
|
import {usePhotosStore} from "stores/Photos";
|
||||||
import {computed} from "vue";
|
import {computed, onMounted} from "vue";
|
||||||
import {publicFlightBreadcrumbs} from "src/composables/breadcrumbs";
|
import {publicFlightBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
const {isQueryRunning, flight} = storeToRefs(useFlightsStore());
|
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 {isQueryRunning: arePhotosLoading, photos: flightPhotos} = storeToRefs(usePhotosStore());
|
||||||
|
|
||||||
const flightNameFormatted = flightName(flight.value);
|
const flightNameFormatted = flightName(flight.value);
|
||||||
@@ -52,7 +54,7 @@ useMeta(() => metaData({
|
|||||||
...flightEventKeywords(event.value)
|
...flightEventKeywords(event.value)
|
||||||
],
|
],
|
||||||
description: flight.value.description,
|
description: flight.value.description,
|
||||||
image: flight.value.titlePhoto?.url
|
image: flight.value.socialImageUrl
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ useMeta(() => metaData({
|
|||||||
title: `${props.pilot.publicUsername} - Lety`,
|
title: `${props.pilot.publicUsername} - Lety`,
|
||||||
keywords: [...commonKeywords, "pilot", props.pilot.publicUsername, props.pilot.name],
|
keywords: [...commonKeywords, "pilot", props.pilot.publicUsername, props.pilot.name],
|
||||||
description: `Výlety publikované pilotem ${props.pilot.name}. ${props.pilot.publicUsername}: ${props.pilot.description}`,
|
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);
|
useAppStore().setPageTitle(props.pilot.publicUsername);
|
||||||
|
|||||||
Reference in New Issue
Block a user