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)