fix(ux): Gefahrenzone-Werkzeug + Linienstärke + Text-Reset (v1.6.6)
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 33m35s

Aus interner UX-Review:
- Gefahrenzone-Werkzeug (Shortcut D) fehlte komplett in der Werkzeugleiste →
  am Handy (ohne Tastatur) gar nicht auslösbar. Jetzt mit AlertTriangle-Icon drin.
- Linienstärke-Regler ergänzt (Dünn/Mittel/Dick) — die Props selectedWidth/
  onWidthChange waren vorhanden, aber nirgends bedienbar.
- Text-Dialog setzt sich beim Öffnen zurück (kein alter Text nach Abbrechen mehr).
- Einsatz-Beschreibung als mehrzeiliges Textfeld statt einzeiligem Input.

Hinweis: Audit-Trail-Trigger bewusst NICHT wieder ergänzt — war auf ausdrücklichen
Wunsch aus dem Menü entfernt worden.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pepe Ziberi
2026-07-22 21:41:20 +02:00
parent 92e1e65b71
commit 3a5c7419f9
4 changed files with 42 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "lageplan",
"version": "1.6.5",
"version": "1.6.6",
"description": "Feuerwehr Lageplan - Krokier-App für Einsatzdokumentation",
"private": true,
"scripts": {

View File

@@ -419,12 +419,14 @@ export function ProjectDialog({
<div className="space-y-2">
<Label htmlFor="project-description">Beschreibung</Label>
<Input
<textarea
id="project-description"
value={description}
onChange={(e) => setDescription(e.target.value)}
placeholder="Optionale Notizen zum Einsatz"
disabled={isCreating}
rows={3}
className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-60 resize-y"
/>
</div>

View File

@@ -1,6 +1,6 @@
'use client'
import { useState } from 'react'
import { useState, useEffect } from 'react'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
@@ -23,6 +23,11 @@ export function TextDialog({ open, onOpenChange, onConfirm, selectedColor }: Tex
const [text, setText] = useState('')
const [fontSize, setFontSize] = useState(16)
// Beim Öffnen zurücksetzen — sonst erscheint beim nächsten Text der alte Inhalt
useEffect(() => {
if (open) { setText(''); setFontSize(16) }
}, [open])
const handleConfirm = () => {
if (text.trim()) {
onConfirm(text.trim(), fontSize)

View File

@@ -21,6 +21,7 @@ import {
MoveRight,
Ruler,
Eraser,
AlertTriangle,
} from 'lucide-react'
import type { DrawMode } from '@/types'
import { cn } from '@/lib/utils'
@@ -58,10 +59,17 @@ const drawTools: { mode: DrawMode; icon: typeof MousePointer2; label: string; sh
{ mode: 'freehand', icon: Pencil, label: 'Freihand', shortcut: 'F' },
{ mode: 'arrow', icon: MoveRight, label: 'Pfeil / Route', shortcut: 'A' },
{ mode: 'text', icon: Type, label: 'Text', shortcut: 'T' },
{ mode: 'dangerzone', icon: AlertTriangle, label: 'Gefahrenzone', shortcut: 'D' },
{ mode: 'eraser', icon: Eraser, label: 'Radiergummi', shortcut: 'E' },
{ mode: 'measure', icon: Ruler, label: 'Messen', shortcut: 'M' },
]
const widths = [
{ value: 2, label: 'Dünn' },
{ value: 4, label: 'Mittel' },
{ value: 7, label: 'Dick' },
]
export function LeftToolbar({
drawMode,
onDrawModeChange,
@@ -158,6 +166,30 @@ export function LeftToolbar({
/>
))}
</div>
<div className="w-8 lg:w-12 h-px bg-border my-1" />
{/* Linienstärke */}
<div className="flex flex-col gap-1">
{widths.map((w) => (
<button
key={w.value}
onClick={() => onWidthChange(w.value)}
disabled={!canEdit}
title={`Linienstärke: ${w.label}`}
className={cn(
'w-11 h-8 lg:w-12 lg:h-8 rounded-md flex items-center justify-center transition-colors',
selectedWidth === w.value ? 'bg-primary/15 ring-1 ring-primary' : 'hover:bg-accent',
!canEdit && 'opacity-50 cursor-not-allowed'
)}
>
<span
className="rounded-full bg-foreground"
style={{ width: '20px', height: `${w.value}px` }}
/>
</button>
))}
</div>
</aside>
</TooltipProvider>
)