From ef86a09ee8d8fc287b382cf9092af8726b44ceae Mon Sep 17 00:00:00 2001
From: Ariel Costas Guerrero
Date: Mon, 17 Nov 2025 16:39:48 +0100
Subject: Drop support for Santiago de Compostela, add collection script
---
src/frontend/app/components/LineIcon.css | 30 ------------------------------
src/frontend/app/data/LineColors.ts | 28 ----------------------------
src/frontend/app/data/RegionConfig.ts | 22 +++-------------------
src/frontend/app/routes/settings.tsx | 7 -------
4 files changed, 3 insertions(+), 84 deletions(-)
(limited to 'src/frontend/app')
diff --git a/src/frontend/app/components/LineIcon.css b/src/frontend/app/components/LineIcon.css
index 0b93023..721de76 100644
--- a/src/frontend/app/components/LineIcon.css
+++ b/src/frontend/app/components/LineIcon.css
@@ -64,36 +64,6 @@
--line-vigo-u1-text: #ffffff;
--line-vigo-u2: rgb(172, 100, 4);
--line-vigo-u2-text: #ffffff;
-
- --line-santiago-l1: #f32621;
- --line-santiago-l4: #ffcc33;
- --line-santiago-l5: #fa8405;
- --line-santiago-l6: #d73983;
- --line-santiago-l6a: #d73983;
- --line-santiago-l7: #488bc1;
- --line-santiago-l8: #6aaf48;
- --line-santiago-l9: #46b8bb;
- --line-santiago-c11: #aec741;
- --line-santiago-l12: #842e14;
- --line-santiago-l12-text: #ffffff;
- --line-santiago-l13: #336600;
- --line-santiago-l13-text: #ffffff;
- --line-santiago-l15: #7a4b2a;
- --line-santiago-l15-text: #ffffff;
- --line-santiago-c2: #283a87;
- --line-santiago-c2-text: #ffffff;
- --line-santiago-c4: #283a87;
- --line-santiago-c4-text: #ffffff;
- --line-santiago-c5: #999999;
- --line-santiago-c6: #006666;
- --line-santiago-c6-text: #ffffff;
- --line-santiago-p1: #537eb3;
- --line-santiago-p2: #d23354;
- --line-santiago-p3: #75bd96;
- --line-santiago-p4: #f1c54f;
- --line-santiago-p6: #999999;
- --line-santiago-p7: #d2438c;
- --line-santiago-p8: #e28c3a;
}
.line-icon {
diff --git a/src/frontend/app/data/LineColors.ts b/src/frontend/app/data/LineColors.ts
index 0d23211..f0599a3 100644
--- a/src/frontend/app/data/LineColors.ts
+++ b/src/frontend/app/data/LineColors.ts
@@ -53,32 +53,6 @@ const vigoLineColors: Record = {
u2: { background: "rgb(172, 100, 4)", text: "#ffffff" },
};
-const santiagoLineColors: Record = {
- l1: { background: "#f32621", text: "#ffffff" },
- l4: { background: "#ffcc33", text: "#000000" },
- l5: { background: "#fa8405", text: "#ffffff" },
- l6: { background: "#d73983", text: "#ffffff" },
- l6a: { background: "#d73983", text: "#ffffff" },
- l7: { background: "#488bc1", text: "#ffffff" },
- l8: { background: "#6aaf48", text: "#ffffff" },
- l9: { background: "#46b8bb", text: "#ffffff" },
- c11: { background: "#aec741", text: "#000000" },
- l12: { background: "#842e14", text: "#ffffff" },
- l13: { background: "#336600", text: "#ffffff" },
- l15: { background: "#7a4b2a", text: "#ffffff" },
- c2: { background: "#283a87", text: "#ffffff" },
- c4: { background: "#283a87", text: "#ffffff" },
- c5: { background: "#999999", text: "#000000" },
- c6: { background: "#006666", text: "#ffffff" },
- p1: { background: "#537eb3", text: "#ffffff" },
- p2: { background: "#d23354", text: "#ffffff" },
- p3: { background: "#75bd96", text: "#000000" },
- p4: { background: "#f1c54f", text: "#000000" },
- p6: { background: "#999999", text: "#000000" },
- p7: { background: "#d2438c", text: "#ffffff" },
- p8: { background: "#e28c3a", text: "#ffffff" },
-};
-
const defaultLineColor: LineColorInfo = {
background: "#d32f2f",
text: "#ffffff",
@@ -93,8 +67,6 @@ export function getLineColor(
if (region === "vigo") {
return vigoLineColors[formattedLine.toLowerCase().trim()] ?? defaultLineColor;
- } else if (region === "santiago") {
- return santiagoLineColors[formattedLine] ?? defaultLineColor;
}
return defaultLineColor;
diff --git a/src/frontend/app/data/RegionConfig.ts b/src/frontend/app/data/RegionConfig.ts
index 7722170..0c188ef 100644
--- a/src/frontend/app/data/RegionConfig.ts
+++ b/src/frontend/app/data/RegionConfig.ts
@@ -1,4 +1,4 @@
-export type RegionId = "vigo" | "santiago";
+export type RegionId = "vigo";
export interface RegionConfig {
id: RegionId;
@@ -33,23 +33,7 @@ export const REGIONS: Record = {
textColour: "#e72b37",
defaultZoom: 14,
showMeters: true,
- },
- santiago: {
- id: "santiago",
- name: "Santiago de Compostela",
- stopsEndpoint: "/stops/santiago.json",
- estimatesEndpoint: "/api/santiago/GetStopEstimates",
- consolidatedCirculationsEndpoint: null, // Not available for Santiago
- timetableEndpoint: null, // Not available for Santiago
- defaultCenter: [42.8782, -8.5448],
- bounds: {
- sw: [-8.884454, 42.719102],
- ne: [-8.243814, 43.02205],
- },
- textColour: "#6bb238",
- defaultZoom: 14,
- showMeters: false, // Santiago doesn't provide distance data
- },
+ }
};
export const DEFAULT_REGION: RegionId = "vigo";
@@ -63,5 +47,5 @@ export function getAvailableRegions(): RegionConfig[] {
}
export function isValidRegion(regionId: string): regionId is RegionId {
- return regionId === "vigo" || regionId === "santiago";
+ return regionId === "vigo";
}
diff --git a/src/frontend/app/routes/settings.tsx b/src/frontend/app/routes/settings.tsx
index 85ec5a1..d9c882d 100644
--- a/src/frontend/app/routes/settings.tsx
+++ b/src/frontend/app/routes/settings.tsx
@@ -190,13 +190,6 @@ export default function Settings() {
.
)}
- {region === "santiago" && (
-
- Datos obtenidos de app MaisBus (Concello de Santiago/TUSSA), gracias a
- la documentación de [TP
- Galicia](https://tpgalicia.github.io/urban/santiago/) en GitHub.
-
- )}
{showModal && (
--
cgit v1.3