Planovac, lepsi social image
This commit is contained in:
@@ -81,7 +81,7 @@ const handleMarkerMove = async (idx, event) => {
|
||||
<template>
|
||||
<MapWrapper
|
||||
ref="mapWrap"
|
||||
style="width: 100%; height: 100%; min-height: 500px"
|
||||
style="width: 100%; height: 65vh; min-height: 500px"
|
||||
:center="center"
|
||||
:zoom="8"
|
||||
:track="{path: track, geodesic: true, strokeColor: '#ff00ff', strokeOpacity: 1, strokeWeight: 3}"
|
||||
|
||||
@@ -43,7 +43,7 @@ const totalTime = computed(() => {
|
||||
|
||||
<template>
|
||||
<q-list bordered class="q-ml-md-md q-pt-md">
|
||||
<q-item>
|
||||
<q-item class="mobile-hide">
|
||||
<q-item-section>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<q-btn
|
||||
@@ -65,7 +65,7 @@ const totalTime = computed(() => {
|
||||
</q-item-section>
|
||||
</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">
|
||||
<q-item dense>
|
||||
<q-item-section>
|
||||
@@ -114,7 +114,7 @@ const totalTime = computed(() => {
|
||||
</q-scroll-area>
|
||||
|
||||
<template v-if="totalDistance">
|
||||
<q-item>
|
||||
<q-item class="mobile-hide">
|
||||
<q-item-section>
|
||||
<q-separator/>
|
||||
</q-item-section>
|
||||
|
||||
@@ -245,7 +245,7 @@ const isControlsOpened = ref(false);
|
||||
@click="handleMapClick"
|
||||
map-type-id="roadmap"
|
||||
gesture-handling="greedy"
|
||||
:max-zoom="13"
|
||||
:max-zoom="11"
|
||||
ref="mapRef"
|
||||
>
|
||||
<AirspaceInfoWindow
|
||||
@@ -289,24 +289,23 @@ const isControlsOpened = ref(false);
|
||||
▲
|
||||
</CustomMarker>
|
||||
</template>
|
||||
|
||||
<template v-for="poi in pointsOfInterest" :key="poi.name">
|
||||
<CustomMarker
|
||||
v-if="poi.gpsLatitude && poi.gpsLongitude"
|
||||
:options="{position: {lat: poi.gpsLatitude, lng: poi.gpsLongitude}, anchorPoint: 'BOTTOM_CENTER'}"
|
||||
@click.stop="handlePoiClick(poi)"
|
||||
>
|
||||
<div style="padding: 5px; border-radius: 15px; background: #8bdfff">
|
||||
<img style="width: 20px" src="/public/mapIcons/photo-32x32.png" alt="">
|
||||
</div>
|
||||
</CustomMarker>
|
||||
</template>
|
||||
|
||||
<Polyline v-if="track" :options="track"/>
|
||||
</template>
|
||||
|
||||
<template v-for="poi in pointsOfInterest" :key="poi.name">
|
||||
<CustomMarker
|
||||
v-if="poi.gpsLatitude && poi.gpsLongitude"
|
||||
:options="{position: {lat: poi.gpsLatitude, lng: poi.gpsLongitude}, anchorPoint: 'BOTTOM_CENTER'}"
|
||||
@click.stop="handlePoiClick(poi)"
|
||||
>
|
||||
<div style="padding: 5px; border-radius: 15px; background: #8bdfff">
|
||||
<img style="width: 20px" src="/mapIcons/photo-32x32.png" alt="">
|
||||
</div>
|
||||
</CustomMarker>
|
||||
</template>
|
||||
|
||||
<CustomControl position="BOTTOM_LEFT" v-if="showLayerControls" style="width: 30%">
|
||||
<Polyline v-if="track" :options="track"/>
|
||||
|
||||
<CustomControl position="BOTTOM" v-if="showLayerControls" style="width: auto; max-width: 200px">
|
||||
<q-btn
|
||||
@click="isControlsOpened = !isControlsOpened"
|
||||
:icon="isControlsOpened ? 'layers_clear' : 'layers'"
|
||||
@@ -320,8 +319,8 @@ const isControlsOpened = ref(false);
|
||||
<q-card
|
||||
v-if="isControlsOpened"
|
||||
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">
|
||||
<q-checkbox
|
||||
v-model="airspaceLayers[key].displayed"
|
||||
|
||||
@@ -30,6 +30,7 @@ fragment flightFullInfo on Flight {
|
||||
durationMinCalculated
|
||||
isPublic
|
||||
|
||||
socialImageUrl
|
||||
titlePhoto {
|
||||
thumbnailUrl
|
||||
url
|
||||
|
||||
@@ -7,6 +7,7 @@ export const FRAGMENT_USER_FULL_INFO = gql`
|
||||
email
|
||||
avatarImageUrl
|
||||
titleImageUrl
|
||||
socialImageUrl
|
||||
publicUsername
|
||||
description
|
||||
createdAt
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user