chore: remove unused legacy departure card styles and dead code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 20:04:09 +01:00
parent 4a6012b097
commit 5f60ed88c8
3 changed files with 11 additions and 21 deletions

View File

@@ -768,19 +768,7 @@ body.landscape .countdown-large.soon {
text-shadow: 0 0 8px #f39c12, 0 0 12px #f39c12, 0 0 16px rgba(243, 156, 18, 0.8);
}
/* Time range (legacy) */
.time-range {
font-size: 0.85em;
color: var(--color-text-muted);
font-weight: 500;
white-space: nowrap;
}
body.dark-mode .time-range {
color: var(--color-text-secondary);
}
/* Next departures (replaces time-range) */
/* Next departures */
.next-departures {
font-size: 0.8em;
color: var(--color-text-muted);
@@ -1510,10 +1498,6 @@ body.dark-mode .config-search-input:focus-visible {
max-width: 75px;
}
.time-range {
font-size: 0.75em;
}
.direction-arrow-box {
width: 20px;
height: 20px;

View File

@@ -281,7 +281,6 @@ body.landscape .countdown-large {
color: var(--color-text-light);
}
body.landscape .time-range,
body.landscape .next-departures {
color: var(--color-text-secondary);
}

View File

@@ -244,6 +244,8 @@ class DeparturesManager {
return { countdownText, countdownClass };
}
// --- Legacy single-site display methods (fallback if API returns data.departures instead of data.sites) ---
/**
* Create a departure card element (legacy format)
* @param {Object} departure - Departure object
@@ -389,8 +391,11 @@ class DeparturesManager {
});
}
// --- Legacy single-site display methods (continued) ---
/**
* Display departures in the UI
* Display departures in the UI (legacy single-site path)
* Called when API returns data.departures instead of data.sites.
* @param {Array} departures - Array of departure objects
*/
displayDepartures(departures) {
@@ -414,7 +419,7 @@ class DeparturesManager {
}
/**
* Update existing cards or add new ones
* Update existing cards or add new ones (legacy single-site path)
* @param {Array} newDepartures - Array of new departure objects
*/
updateExistingCards(newDepartures) {
@@ -460,7 +465,7 @@ class DeparturesManager {
}
/**
* Update card content
* Update card content (legacy single-site path)
* @param {HTMLElement} card - Card element
* @param {Object} departure - Departure object
*/
@@ -482,6 +487,8 @@ class DeparturesManager {
}
}
// --- End of legacy single-site display methods ---
/**
* Add highlight effect to element
* @param {HTMLElement} element - Element to highlight