From 1c9f6e3f6cbf4f4a497bae1898ba0dd2f858b910 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Thu, 28 Sep 2023 14:48:11 -0400 Subject: [PATCH] refactor(config-types): Add transit operators --- lib/util/config-types.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/util/config-types.ts b/lib/util/config-types.ts index ccf9eae14..3707c50bf 100644 --- a/lib/util/config-types.ts +++ b/lib/util/config-types.ts @@ -12,6 +12,7 @@ import { ModeButtonDefinition, ModeSetting, ModeSettingValues, + TransitOperator, VehicleRentalMapOverlaySymbol } from '@opentripplanner/types' import { GeocoderConfig as GeocoderConfigOtpUI } from '@opentripplanner/geocoder' @@ -271,6 +272,16 @@ export interface ModesConfig { transitModes: TransitModeConfig[] } +export interface ModeColorConfig { + color: string + textColor: string +} + +export interface TransitOperatorConfig extends TransitOperator { + colorMode: 'gtfs' | 'gtfs-softened' | 'disabled' + modeColors: Record +} + /** The main application configuration object */ export interface AppConfig { api: ApiConfig @@ -305,6 +316,7 @@ export interface AppConfig { sessionTimeoutSeconds?: number /** App title shown in the browser title bar. */ title?: string + transitOperators?: TransitOperatorConfig[] // TODO: add other config items. }