minor graphics update
Sonarqube Scanner / Build and analyze (push) Failing after 20s

This commit is contained in:
Florian Zumpe
2026-09-27 20:51:47 +02:00
parent 8b7f801d4a
commit dfa139c543
5 changed files with 43 additions and 13 deletions
+8 -8
View File
@@ -336,7 +336,9 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
const actions = document.createElement('div');
actions.className = classes.iconRow;
actions.appendChild(iconButton('Strecke bearbeiten', '✎', 'edit-route'));
actions.appendChild(iconButton('Strecke löschen', '×', 'delete-route', false, true));
if (routeSource(route) === 'local') {
actions.appendChild(iconButton('Strecke löschen', '×', 'delete-route', false, true));
}
item.append(label, actions);
return item;
}
@@ -1184,13 +1186,9 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
async function deleteRouteFromList(route) {
const id = routeId(route);
if (!id) return;
if (!id || routeSource(route) !== 'local') return;
if (routeSource(route) === 'local') {
ns.LocalRoutes.remove(id);
} else {
await sendDelete(`/routes/${encodeURIComponent(id)}`);
}
ns.LocalRoutes.remove(id);
if (routeId(state.currentRoute) === id && state.currentSource === routeSource(route)) {
state.currentRoute = null;
@@ -1214,7 +1212,9 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
await loadRoute(route);
return;
}
if (action === 'delete-route') await deleteRouteFromList(route);
if (action === 'delete-route' && routeSource(route) === 'local') {
await deleteRouteFromList(route);
}
}
async function deletePoiFromList(poi) {