From dbb3dac7f6b69b63bb5ea27bfcb0f788f13a516c Mon Sep 17 00:00:00 2001 From: josh Date: Fri, 17 Jul 2026 23:40:44 +1000 Subject: [PATCH 1/2] Fixed Bug With Shared Flights --- app/Settings/SettingsRegistry.php | 36 ++- .../FlightsGoneBy/DepartureBoardTableRow.vue | 5 +- .../js/Components/FlightsGoneBy/Time.vue | 42 +++ resources/js/Pages/AddFlight.vue | 274 ++++++++++++++++-- resources/js/Types/types.d.ts | 2 + 5 files changed, 313 insertions(+), 46 deletions(-) create mode 100644 resources/js/Components/FlightsGoneBy/Time.vue diff --git a/app/Settings/SettingsRegistry.php b/app/Settings/SettingsRegistry.php index 413ba8a..8720fc0 100644 --- a/app/Settings/SettingsRegistry.php +++ b/app/Settings/SettingsRegistry.php @@ -13,24 +13,13 @@ class SettingsRegistry 'AI Generated Content' => 'Airline tail logos and liveries are AI generated with human cleanup. If you would rather not see any AI, then our blank aircraft templates are human created.', 'Account & Privacy' => 'Everything to do with your account.', 'Notifications' => 'What you want to hear about (or not!)', + 'Localization' => 'Units of measurement, date and time preferences.', ]; } public static function schema(): array { return [ - [ - 'key' => 'distance_unit', - 'type' => 'select', - 'label' => 'Distance Units', - 'category' => 'FlightsGoneBy Settings', - 'default' => 'km', - 'options' => [ - ['value' => 'km', 'label' => 'Kilometres (km)'], - ['value' => 'mi', 'label' => 'Miles (mi)'], - ['value' => 'nm', 'label' => 'Nautical miles (nm)'], - ], - ], [ 'category' => 'Account & Privacy', 'key' => 'profile_privacy', @@ -42,6 +31,29 @@ class SettingsRegistry ['value' => 'private', 'label' => 'Private Profile Viewable Only By You and Your Approved Followers'], ] ], + [ + 'key' => 'distance_unit', + 'type' => 'select', + 'label' => 'Distance Units', + 'category' => 'Localization', + 'default' => 'km', + 'options' => [ + ['value' => 'km', 'label' => 'Kilometres (km)'], + ['value' => 'mi', 'label' => 'Miles (mi)'], + ['value' => 'nm', 'label' => 'Nautical miles (nm)'], + ], + ], + [ + 'key' => 'time_format', + 'type' => 'select', + 'label' => 'Time Format', + 'category' => 'Localization', + 'default' => 'ampm', + 'options' => [ + ['value' => 'ampm', 'label' => 'AM/PM'], + ['value' => '24hr', 'label' => '24-Hour'], + ], + ], [ 'key' => 'default_login_page', 'type' => 'select', diff --git a/resources/js/Components/FlightsGoneBy/DepartureBoardTableRow.vue b/resources/js/Components/FlightsGoneBy/DepartureBoardTableRow.vue index eacde6e..c5e1bb6 100644 --- a/resources/js/Components/FlightsGoneBy/DepartureBoardTableRow.vue +++ b/resources/js/Components/FlightsGoneBy/DepartureBoardTableRow.vue @@ -12,6 +12,7 @@ import { usePage } from "@inertiajs/vue3"; import { User } from "@/Types/types"; import Mono from "@/Components/FlightsGoneBy/Mono.vue"; import DayDifference from "@/Components/FlightsGoneBy/DayDifference.vue"; +import Time from "@/Components/FlightsGoneBy/Time.vue"; const props = defineProps<{ flight: Flight @@ -98,12 +99,12 @@ const showColumn = (column: string) => props.columnsToShow.includes(column) - {{ flight.departure_time_display }} + - {{ flight.arrival_time_display }} + diff --git a/resources/js/Components/FlightsGoneBy/Time.vue b/resources/js/Components/FlightsGoneBy/Time.vue new file mode 100644 index 0000000..e176007 --- /dev/null +++ b/resources/js/Components/FlightsGoneBy/Time.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/resources/js/Pages/AddFlight.vue b/resources/js/Pages/AddFlight.vue index fa106fc..fda1745 100644 --- a/resources/js/Pages/AddFlight.vue +++ b/resources/js/Pages/AddFlight.vue @@ -1,16 +1,16 @@