Prvni naznak verejne casti, sprava profilu

This commit is contained in:
Michal Kváček
2023-08-09 00:26:59 +02:00
parent c4603cf090
commit 25250ae00e
31 changed files with 6505 additions and 786 deletions
+22 -6
View File
@@ -9,6 +9,16 @@ const props = defineProps({
items: {
type: Array,
required: true
},
routeDetail: {
type: Object,
required: false,
default: () => ({name: 'flightDetail', params: {}})
},
displayVisibilityInfo: {
type: Boolean,
required: false,
default: false
}
});
@@ -16,14 +26,16 @@ const props = defineProps({
<template>
<q-list bordered separator class="q-mx-md q-my-md">
<q-item v-for="flight of items" :key="flight" ripple clickable :to="{name: 'flightDetail', params:{id: flight.id}}">
<q-item
v-for="flight of items" :key="flight"
ripple
clickable
:to="{name: routeDetail.name, params:{...routeDetail.params, id: flight.id}}"
>
<q-item-section avatar>
<q-avatar size="100px">
<div v-if="flight.coverPhoto" :style="`width: 100px; height: 100px; background-image: url('${flight.coverPhoto.thumbnailUrl}'); background-size: cover`"></div>
</q-avatar>
</q-item-section>
<q-item-section>
{{ flightName(flight) }}
@@ -32,8 +44,8 @@ const props = defineProps({
{{ formatDatetime(flight.takeoffDatetime) }}
</div>
<div class="text-secondary">
<q-icon name="schedule" />
{{ minutesToHumanReadable(flight.durationMinCalculated) }}
<q-icon name="schedule"/>
{{ minutesToHumanReadable(flight.durationMinCalculated) }}
</div>
<div class="text-secondary">
@@ -41,6 +53,10 @@ const props = defineProps({
{{ flight.aircraft.callSign }}
</div>
</q-item-section>
<q-item-section side top v-if="flight.isPublic && displayVisibilityInfo">
<q-icon name="visibility"></q-icon>
</q-item-section>
</q-item>
</q-list>
</template>
@@ -26,8 +26,13 @@ const formData = reactive({
outlined
standout
multiple
accept=".jpg, .jpeg"
v-model="formData.photos"
label="Vybert fotky k nahrání"
/>
>
<template #prepend>
<q-icon name="upload" />
</template>
</q-file>
</FormWrapper>
</template>
@@ -51,7 +51,17 @@ onMounted(() => {
<template>
<FormWrapper v-model="formData">
<q-file v-model="formData.gpxTrack" v-bind="commonProps" label="Trasa v GPX" hint="Slouží pro vykreslení kompletní a detailní trasy"/>
<q-file
accept=".gpx"
v-model="formData.gpxTrack"
v-bind="commonProps"
label="Nahrát trasu v GPX"
hint="Slouží pro vykreslení kompletní a detailní trasy"
>
<template #prepend>
<q-icon name="upload" />
</template>
</q-file>
<template v-if="flight.gpxTrackUrl">
<q-icon name="check" color="green" /> Trasa nahrána
@@ -64,7 +74,7 @@ onMounted(() => {
:options="locations"
@select="addTrackItem"
clearable
label="Otočný bod"
label="Přidat otočný bod"
hint="Nastav významné otočné body"
/>