diff --git a/package.json b/package.json index a79a959..afdc0ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lageplan", - "version": "1.5.2", + "version": "1.5.3", "description": "Feuerwehr Lageplan - Krokier-App für Einsatzdokumentation", "private": true, "scripts": { diff --git a/src/components/layout/topbar.tsx b/src/components/layout/topbar.tsx index 1941cd8..9fdf3ca 100644 --- a/src/components/layout/topbar.tsx +++ b/src/components/layout/topbar.tsx @@ -23,7 +23,6 @@ import { Save, FolderOpen, Download, - Clock, Sun, Moon, Maximize, @@ -45,6 +44,9 @@ import { Lock, Unlock, CheckCircle2, + Plus, + ChevronDown, + Loader2, } from 'lucide-react' import { HoseSettingsDialog } from '@/components/dialogs/hose-settings-dialog' import type { Project, DrawFeature, ProjectMode } from '@/types' @@ -161,155 +163,149 @@ export function Topbar({ } return ( -
-
-
- - Lageplan - v{process.env.APP_VERSION} -
- -
- -
- - - - - {/* Direkte Einstiegspunkte: Einsatz (rot) und Übung (blau) */} - - - - - - - - - - - Einsätze verwalten - - handleExport('png')} className="py-2.5 px-3"> - - Als PNG exportieren - - handleExport('pdf')} className="py-2.5 px-3"> - - Als PDF exportieren - - {onClearAll && ( - - - Zeichnung leeren - - )} - {(userRole === 'SERVER_ADMIN' || userRole === 'TENANT_ADMIN') && ( - window.location.href = '/admin'} className="py-2.5 px-3"> - - Einstellungen - - )} - - +
+ {/* Zone 1 — Identität */} +
+ +
+ LAGEPLAN + v{process.env.APP_VERSION}
-
- {/* Project info - desktop only */} - {project && ( -
+
+ + {/* Zone 2 — Aktiver Einsatz (Blickfang) */} +
+ {project ? ( +
+ {(project as any).einsatzNr && ( - {(project as any).einsatzNr} + {(project as any).einsatzNr} )} - {project.title} + {project.title} {project.location && ( - <>|{project.location} + · {project.location} )}
+ ) : ( + Kein Einsatz aktiv )} +
- {/* Clock - desktop only */} -
- - {now.toLocaleTimeString('de-CH', { hour: '2-digit', minute: '2-digit' })} -
- - {/* Desktop: individual buttons */} - + {/* Zone 3 — Uhr + Aktionen */} +
+ {/* Uhr — Ops-Rooms leben nach der Uhr */} + + {now.toLocaleTimeString('de-CH', { hour: '2-digit', minute: '2-digit' })} + + {/* Speichern */} + {/* Neu — Split-Button für Einsatz/Übung (ein Akzent statt zwei farbiger Buttons) */} + + + + + + onNewProject('EINSATZ')} className="py-2.5"> + + Neuer Einsatz + + onNewProject('UEBUNG')} className="py-2.5"> + + Neue Übung + + + + + {/* Werkzeuge (Desktop) — sammelt alle Neben-Aktionen in einem Menü */} + + + + + + + + Einsätze verwalten + + + handleExport('png')}> + + Als PNG exportieren + + handleExport('pdf')}> + + Als PDF exportieren + + {onClearAll && ( + + + Zeichnung leeren + + )} + + {onTogglePresentationLock && ( + + {presentationLocked ? : } + {presentationLocked ? 'Präsentation: gesperrt' : 'Präsentationsmodus'} + + )} + + {isFullscreen ? : } + {isFullscreen ? 'Vollbild verlassen' : 'Vollbild'} + + + {isDarkMode ? : } + {isDarkMode ? 'Tagmodus' : 'Nachtmodus'} + + setIsHoseSettingsOpen(true)}> + + Schlaucheinstellungen + + + + + {/* Einsatz beenden (Desktop) */} {project && onEndProject && ( )} - {/* Desktop: User menu dropdown */} + {/* Benutzer (Desktop) */} {userName && onLogout && ( -
+
- @@ -366,17 +362,13 @@ export function Topbar({ )} - {/* Einsatz / Übung */} + {/* Einsatz / Übung (Erstellen liegt im „Neu"-Button) */} {project && onEndProject && ( {project.mode === 'UEBUNG' ? 'Übung beenden' : 'Einsatz beenden'} )} - onNewProject('UEBUNG')}> - - Neue Übung - Einsätze verwalten