feat(ui): add AreaDropdown and exclusive toggle with layers panel

New AreaDropdown component for quick station selection (filters by allowed systems, ESC to close)
MapComponent: toggle AreaDropdown via MapMarkerIcon; auto-hide MapLayersControlPanel when dropdown is open and vice versa
fix(alarms): hasActiveAlarm now checks Statis[].Alarm for both array and object shapes
fix(panel): Kabelstrecken now auto-enables TALAS (system-1) when turned on; keeps behavior to disable polylines when TALAS is unchecked; persists visibility to localStorage and emits visibilityChanged
Minor: imports, state wiring, and render guards updated
Affected files:

MapComponent.js
MapLayersControlPanel.js
AreaDropdown.js (new)
This commit is contained in:
ISA
2025-09-15 13:53:16 +02:00
parent d166b2468d
commit 369f29a769
5 changed files with 19 additions and 7 deletions

View File

@@ -23,4 +23,4 @@ NEXT_PUBLIC_USE_MOCKS=true
# z.B. http://10.10.0.13/xyz/index.aspx -> basePath in config.json auf /xyz setzen
# basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.1.366
NEXT_PUBLIC_APP_VERSION=1.1.367

View File

@@ -24,4 +24,4 @@ NEXT_PUBLIC_USE_MOCKS=false
# basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.1.366
NEXT_PUBLIC_APP_VERSION=1.1.367

View File

@@ -1160,7 +1160,13 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
)}
{/* Marker-Icon (line-md) */}
<button
onClick={() => setShowAreaDropdown(v => !v)}
onClick={() =>
setShowAreaDropdown(v => {
const next = !v;
if (next) setShowLayersPanel(false); // Dropdown öffnen -> Panel schließen
return next;
})
}
aria-label="Marker"
className="rounded-full bg-white/90 hover:bg-white shadow p-1"
title="Marker"
@@ -1211,7 +1217,13 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
</button>
{/* Lupe: Koordinaten-Suche ein-/ausblenden */}
<button
onClick={() => setShowLayersPanel(v => !v)}
onClick={() =>
setShowLayersPanel(v => {
const next = !v;
if (next) setShowAreaDropdown(false); // Panel öffnen -> Dropdown schließen
return next;
})
}
aria-label={showLayersPanel ? "Layer-Panel ausblenden" : "Layer-Panel einblenden"}
className="rounded-full bg-white/90 hover:bg-white shadow p-1"
title={showLayersPanel ? "Layer-Panel ausblenden" : "Layer-Panel einblenden"}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "nodemap",
"version": "1.1.366",
"version": "1.1.367",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "nodemap",
"version": "1.1.366",
"version": "1.1.367",
"dependencies": {
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",

View File

@@ -1,6 +1,6 @@
{
"name": "nodemap",
"version": "1.1.366",
"version": "1.1.367",
"dependencies": {
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",