display additional information for station

This commit is contained in:
kritzl 2024-06-06 15:16:18 +02:00
parent caa96f565f
commit 9a6be1d010
4 changed files with 43 additions and 3 deletions

View file

@ -88,6 +88,7 @@ async function loadElevators() {
for (const station of stations) {
const stationName = station['mainSubStation']['stationName'];
const stationComment = station['mainSubStation']['comment'];
const lines = new Set();
const elevators = [];
for (const elevatorKey of Object.keys(station.elevators)) {
@ -155,7 +156,7 @@ async function loadElevators() {
internalData.stations[stationIndex++] = {
name: stationName,
comment: station['comment'],
comment: stationComment,
state: stationState,
lines: stationLines,
types: stationTypes,
@ -540,8 +541,9 @@ ${station.state.unavailable ? `Bei ${station.state.unavailable} ${station.state.
</div>
<details data-stationid="${station.id}" ${openStations.has(station.id) ? 'open' : ''}>
<summary>
Aufzüge anzeigen
Details / Aufzüge anzeigen
</summary>
${station.comment ? `<div class="comment"><p>${station.comment}</p></div>` : ''}
<ul class="elevatorList collapsed" aria-expanded="false" id="station_${station.id}_elevatorList">
${elevatorsTemplate}
</ul>