Added User Settings
This commit is contained in:
Vendored
+27
-1
@@ -17,7 +17,33 @@ export interface User {
|
||||
name: string
|
||||
email: string
|
||||
email_verified_at: string | null
|
||||
distance_unit: "km" | "mi" | "nm"
|
||||
resolved_settings?: UserSettings
|
||||
}
|
||||
|
||||
export type DistanceUnit = "km" | "mi" | "nm"
|
||||
|
||||
export interface UserSettings {
|
||||
distance_unit: DistanceUnit
|
||||
show_ai_tail_logos: boolean
|
||||
show_ai_livery_images: boolean
|
||||
departure_board_columns: string[]
|
||||
}
|
||||
|
||||
|
||||
export type SettingType = 'select' | 'text' | 'checkbox' | 'multiselect'
|
||||
export interface SettingOption {
|
||||
value: string
|
||||
label: string
|
||||
}
|
||||
|
||||
export interface SettingField {
|
||||
key: keyof UserSettings
|
||||
type: SettingType
|
||||
label: string
|
||||
category: string
|
||||
default: UserSettings[keyof UserSettings]
|
||||
value: UserSettings[keyof UserSettings]
|
||||
options?: SettingOption[]
|
||||
}
|
||||
|
||||
export type UserActionType = "flight_cancelled" | "flight_booked" | "flight_updated" | "flight_logged" | "flight_deleted" | "flight_imported" | "flight_departing" | "flight_arriving"
|
||||
|
||||
Reference in New Issue
Block a user