caption updates
Sonarqube Scanner / Build and analyze (push) Failing after 17s

This commit is contained in:
Florian Zumpe
2026-09-27 21:57:36 +02:00
parent 7f6d0425d5
commit 136646ebd2
+13 -7
View File
@@ -149,23 +149,29 @@
return nearestPendingPoi(poiMetrics(state.position));
}
function setRouteControlSummary(titleText, detailText) {
$('#route-control-title').text(titleText);
$('#route-control-next').text(detailText);
$('.route-control-summary').attr('aria-label', `${titleText}. ${detailText}`);
}
function updateRouteControlSummary() {
const title = $('#route-control-title');
const next = $('#route-control-next');
if (!state.route) {
title.text('Route wählen');
next.text('Aktive und lokale Strecken');
setRouteControlSummary('Route wählen', 'Aktive und lokale Strecken');
return;
}
title.text(state.route.name || 'Route');
const titleText = state.route.name || 'Route';
const metric = nextPoiMetric();
if (!metric) {
next.text((state.route.pois || []).length ? 'Alle Streckenpunkte erreicht' : 'Keine Streckenpunkte vorhanden');
const detailText = (state.route.pois || []).length
? 'Alle Streckenpunkte erreicht'
: 'Keine Streckenpunkte vorhanden';
setRouteControlSummary(titleText, detailText);
return;
}
const distance = metric.distance == null ? '' : ` · ${Math.round(metric.distance)} m`;
next.text(`Nächster Streckenpunkt: ${metric.poi.title}${distance}`);
setRouteControlSummary(titleText, `Nächster Streckenpunkt: ${metric.poi.title}${distance}`);
}
function renderRouteControlList(selector, routes, source, emptyText) {