Added Splash Screens for PWA
This commit is contained in:
@@ -17,7 +17,7 @@ const props = defineProps<{
|
||||
const page = usePage<SharedProps>().props
|
||||
const ITEMS_PER_PAGE = 25
|
||||
|
||||
const defaultColumns = ['airline', 'flight_number', 'from', 'to', 'departure_date', 'departure_time', 'arrival_time', 'duration', 'distance', 'aircraft', 'registration', 'class_seat_combined']
|
||||
const defaultColumns = ['airline', 'flight_number', 'departure_airport', 'arrival_airport', 'departure_date', 'departure_time', 'arrival_time', 'duration', 'distance', 'aircraft', 'registration', 'class_seat_combined']
|
||||
const columnsToShow = computed(() => page.auth.user?.resolved_settings?.departure_board_columns ?? defaultColumns)
|
||||
const showColumn = (column: string) => columnsToShow.value.includes(column)
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const page = usePage<SharedProps>()
|
||||
|
||||
const showColumn = (column: string) => props.columnsToShow.includes(column)
|
||||
|
||||
</script>
|
||||
|
||||
@@ -269,6 +269,10 @@ export default defineComponent({
|
||||
showLegend: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
compact: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
|
||||
},
|
||||
@@ -649,8 +653,9 @@ export default defineComponent({
|
||||
|
||||
// ── Fit bounds ────────────────────────────────────────────────────────
|
||||
|
||||
const fitBounds = (padding = 60): void => {
|
||||
const fitBounds = (): void => {
|
||||
if (!props.flights.length) return
|
||||
const padding = props.compact ? 25 : 60
|
||||
|
||||
const lngs = props.flights.flatMap(f => [f.departure_airport.longitude_deg, f.arrival_airport.longitude_deg])
|
||||
const lats = props.flights.flatMap(f => [f.departure_airport.latitude_deg, f.arrival_airport.latitude_deg])
|
||||
@@ -673,7 +678,6 @@ export default defineComponent({
|
||||
minLng = Math.min(...lngs)
|
||||
maxLng = Math.max(...lngs)
|
||||
}
|
||||
|
||||
map!.fitBounds([[minLng, minLat], [maxLng, maxLat]], { padding, duration: 0 })
|
||||
}
|
||||
|
||||
|
||||
@@ -40,12 +40,12 @@ defineProps<{
|
||||
|
||||
|
||||
<ToolTipRows v-if="isActive.value">
|
||||
<FlightMap :flights="[flight]" :showLegend="false" />
|
||||
<FlightMap :flights="[flight]" :showLegend="false" compact />
|
||||
</ToolTipRows>
|
||||
|
||||
<ToolTipDivider />
|
||||
|
||||
<ToolTipRows>
|
||||
<ToolTipRows style="min-width: 300px">
|
||||
<ToolTipRow label="From" :value="flight.departure_airport.municipality" />
|
||||
<ToolTipRow label="To" :value="flight.arrival_airport.municipality" />
|
||||
<ToolTipRow label="Airline" :value="flight.airline.name" v-if="flight.airline" />
|
||||
|
||||
@@ -8,7 +8,7 @@ defineProps<{
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="livery" v-if="flight.livery_url" :style="{ backgroundImage: `url('${flight.livery_url}')` }">
|
||||
<div class="livery" v-if="flight.livery_url" :style="{ backgroundImage: `url('${flight.livery_url ?? ''}')` }">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user