diff --git a/resources/js/Components/FlightsGoneBy/DepartureBoard.vue b/resources/js/Components/FlightsGoneBy/DepartureBoard.vue index f9444e8..624b035 100644 --- a/resources/js/Components/FlightsGoneBy/DepartureBoard.vue +++ b/resources/js/Components/FlightsGoneBy/DepartureBoard.vue @@ -17,7 +17,7 @@ const props = defineProps<{ const page = usePage().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) diff --git a/resources/js/Components/FlightsGoneBy/DepartureBoardTableRow.vue b/resources/js/Components/FlightsGoneBy/DepartureBoardTableRow.vue index 09e4ed8..313593a 100644 --- a/resources/js/Components/FlightsGoneBy/DepartureBoardTableRow.vue +++ b/resources/js/Components/FlightsGoneBy/DepartureBoardTableRow.vue @@ -24,6 +24,7 @@ const props = defineProps<{ }>() const page = usePage() + const showColumn = (column: string) => props.columnsToShow.includes(column) diff --git a/resources/js/Components/FlightsGoneBy/FlightMap.vue b/resources/js/Components/FlightsGoneBy/FlightMap.vue index 923e9eb..a88321e 100644 --- a/resources/js/Components/FlightsGoneBy/FlightMap.vue +++ b/resources/js/Components/FlightsGoneBy/FlightMap.vue @@ -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 }) } diff --git a/resources/js/Components/FlightsGoneBy/FlightToolTip.vue b/resources/js/Components/FlightsGoneBy/FlightToolTip.vue index dcca3ce..9074f88 100644 --- a/resources/js/Components/FlightsGoneBy/FlightToolTip.vue +++ b/resources/js/Components/FlightsGoneBy/FlightToolTip.vue @@ -40,12 +40,12 @@ defineProps<{ - + - + diff --git a/resources/js/Components/FlightsGoneBy/LiveryImage.vue b/resources/js/Components/FlightsGoneBy/LiveryImage.vue index 3d5ef4b..e8e7f68 100644 --- a/resources/js/Components/FlightsGoneBy/LiveryImage.vue +++ b/resources/js/Components/FlightsGoneBy/LiveryImage.vue @@ -8,7 +8,7 @@ defineProps<{