remove obsolete elements and cleanup gui
Sonarqube Scanner / Prepare environment (push) Successful in 9s
Sonarqube Scanner / Build and test (push) Successful in 31s
Sonarqube Scanner / SonarQube analysis (push) Successful in 1m22s
Sonarqube Scanner / Deploy to Server (push) Successful in 8s

This commit is contained in:
Florian Zumpe
2026-10-02 10:39:21 +02:00
parent a3ee08ad4d
commit bbb1834709
9 changed files with 101 additions and 118 deletions
-46
View File
@@ -138,42 +138,6 @@
items.forEach(route => list.append(routeButton(route, source)));
}
function nextPoiMetric() {
const pois = state.route?.pois || [];
const pending = pois
.filter(poi => !state.triggered.has(poi.id))
.slice()
.sort((left, right) => Number(left.sequence ?? 0) - Number(right.sequence ?? 0));
if (!pending.length) return null;
if (!state.position) return { poi: pending[0], distance: null };
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() {
if (!state.route) {
setRouteControlSummary(ns.I18n.t("app.choose-route"), ns.I18n.t("app.route-menu"));
return;
}
const titleText = state.route.name || ns.I18n.t("app.route");
const metric = nextPoiMetric();
if (!metric) {
const detailText = (state.route.pois || []).length
? ns.I18n.t("app.stations-complete")
: ns.I18n.t("app.no-stations");
setRouteControlSummary(titleText, detailText);
return;
}
const distance = metric.distance == null ? '' : ` · ${Math.round(metric.distance)} m`;
setRouteControlSummary(titleText, ns.I18n.t("app.next-station-summary", { value1: metric.poi.title, value2: distance }));
}
function renderRouteControlList(selector, routes, source, emptyText) {
const list = $(selector).empty();
if (!routes.length) {
@@ -202,7 +166,6 @@
$('#route-control-local-title').text(ns.I18n.t("app.draft-count", { value1: state.localRoutes.length }));
$('#local-route-title').text(ns.I18n.t("app.draft-count", { value1: state.localRoutes.length }));
updateRouteControlSummary();
renderRouteControlList(
'#route-control-server-list',
state.routes,
@@ -341,11 +304,8 @@
updateRouteControls();
if (returnToRoutes) {
state.route = null;
updateRouteControlSummary();
renderRouteControl();
navigate('#routes-page', { replace: true });
} else {
updateRouteControlSummary();
}
}
@@ -360,7 +320,6 @@
.text(ns.I18n.t("app.pause-hint"));
showNavigation(ns.I18n.t("app.route-paused"), $('#navigation-distance').text() || '–');
updateRouteControls();
updateRouteControlSummary();
}
function suspendCurrentRoute() {
@@ -385,7 +344,6 @@
const list = $('#poi-list').empty();
if (!route.pois.length) {
list.append(("<li><p>" + escapeHtml(ns.I18n.t("app.empty-route")) + "</p></li>"));
updateRouteControlSummary();
return;
}
route.pois.forEach(poi => {
@@ -405,7 +363,6 @@
`);
});
updatePoiIndicators(state.position);
updateRouteControlSummary();
}
function renderRoute(route) {
@@ -602,7 +559,6 @@
renderRouteControl();
if (!state.route) return;
const metrics = updatePoiIndicators(position);
updateRouteControlSummary();
if (state.routeState !== 'running') return;
const nearest = nearestPendingPoi(metrics);
@@ -617,7 +573,6 @@
ns.Vibration.start(ns.Vibration.Patterns.ACTIVE_POI);
showPoi(nearest.poi);
updateNavigation(position);
updateRouteControlSummary();
}
}
@@ -633,7 +588,6 @@
state.deviceHeading = null;
persistRouteProgress();
updateRouteControls();
updateRouteControlSummary();
$('#tracking-status')
.prop('hidden', false)
.text(resumed ? ns.I18n.t("app.resuming") : ns.I18n.t("app.location.start"));