From d51169f6411b68a226d76d2d39826904de484929 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Wed, 19 Nov 2025 15:04:55 +0100 Subject: feat: Add About and Favourites pages, update routing and context management - Added new routes for About and Favourites pages. - Implemented About page with version information and credits. - Created Favourites page with a placeholder message for empty favourites. - Refactored RegionConfig import paths for consistency. - Introduced PageTitleContext to manage page titles dynamically. - Updated various components to utilize the new context for setting page titles. - Enhanced AppShell layout with a responsive Drawer for navigation. - Added CSS styles for new components and pages. - Integrated commit hash display in the About page for version tracking. --- src/frontend/app/data/RegionConfig.ts | 51 ----------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/frontend/app/data/RegionConfig.ts (limited to 'src/frontend/app/data/RegionConfig.ts') diff --git a/src/frontend/app/data/RegionConfig.ts b/src/frontend/app/data/RegionConfig.ts deleted file mode 100644 index 8acfbbf..0000000 --- a/src/frontend/app/data/RegionConfig.ts +++ /dev/null @@ -1,51 +0,0 @@ -export type RegionId = "vigo"; - -export interface RegionConfig { - id: RegionId; - name: string; - stopsEndpoint: string; - estimatesEndpoint: string; - consolidatedCirculationsEndpoint: string | null; - timetableEndpoint: string | null; - defaultCenter: [number, number]; // [lat, lng] - bounds?: { - sw: [number, number]; - ne: [number, number]; - }; - textColour?: string; - defaultZoom: number; - showMeters: boolean; // Whether to show distance in meters -} - -export const REGIONS: Record = { - vigo: { - id: "vigo", - name: "Vigo", - stopsEndpoint: "/stops/vigo.json", - estimatesEndpoint: "/api/vigo/GetStopEstimates", - consolidatedCirculationsEndpoint: "/api/vigo/GetConsolidatedCirculations", - timetableEndpoint: "/api/vigo/GetStopTimetable", - defaultCenter: [42.229188855975046, -8.72246955783102], - bounds: { - sw: [-8.951059, 42.098923], - ne: [-8.447748, 42.3496], - }, - textColour: "#e72b37", - defaultZoom: 14, - showMeters: true, - }, -}; - -export const DEFAULT_REGION: RegionId = "vigo"; - -export function getRegionConfig(regionId: RegionId): RegionConfig { - return REGIONS[regionId]; -} - -export function getAvailableRegions(): RegionConfig[] { - return Object.values(REGIONS); -} - -export function isValidRegion(regionId: string): regionId is RegionId { - return regionId === "vigo"; -} -- cgit v1.3