Skip to content

Commit fdbdbe9

Browse files
ping1979pingclaude
andcommitted
feat: NeuesElement + ElementDetail Redesign — Outdoor-optimiert
NeuesElement: - Schnelltyp entfernt - Header kompakt (Speichern/Speichern&Neu als Nav-Buttons) - Viewport-Filling Layout (Positionstext flex-grow) - Feld-Reihenfolge: Positionstext → Verantw/Thema/Termin → Status+Titel → Position+Bemerkung → Standort+Fotos - Status als Badge + ···-Expand statt Button-Reihe - Position/Bemerkung ohne Label (nur Placeholder) - Standort+Fotos kombiniert in einer Zeile ElementDetail: - Gleiche Feld-Reihenfolge wie NeuesElement - Standort+Fotos kombiniert - Kürzel — Firmenname im Verantwortlich-Dropdown Beide + Übersicht: - ScrollToTopFab (links unten, weiß/blau) - Höherer Kontrast (Labels gray-700, Borders 2px gray-300) - Einheitliche Button-Farben (ping-blue) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent aae5e93 commit fdbdbe9

4 files changed

Lines changed: 645 additions & 0 deletions

File tree

app/src/components/ProtokollUebersicht.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Protokoll, Protokollelement, Protokollgruppe } from '../types';
33
import { STATUS_MAP } from '../types';
44
import { getProtokolleByGruppe, getElemente, getProtokollgruppe, getOrCreateDraftProtokoll, findBautagebuchProtokoll } from '../db';
55
import MapOverview from './map/MapOverview';
6+
import ScrollToTopFab from './ScrollToTopFab';
67
import SyncIndicator from './SyncIndicator';
78
import { useSyncStatus } from '../useSyncStatus';
89

@@ -405,6 +406,7 @@ export default function ProtokollUebersicht({ gruppeId, initialState, onStateCha
405406
</button>
406407
</div>
407408
)}
409+
<ScrollToTopFab />
408410
</div>
409411
);
410412
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { useState, useEffect } from 'react';
2+
3+
export default function ScrollToTopFab() {
4+
const [visible, setVisible] = useState(false);
5+
6+
useEffect(() => {
7+
function onScroll() {
8+
setVisible(window.scrollY > 200);
9+
}
10+
window.addEventListener('scroll', onScroll, { passive: true });
11+
return () => window.removeEventListener('scroll', onScroll);
12+
}, []);
13+
14+
if (!visible) return null;
15+
16+
return (
17+
<button
18+
onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}
19+
className="fixed bottom-3 left-3 bg-white text-ping-blue border-2 border-ping-blue w-11 h-11 rounded-full shadow-lg flex items-center justify-center text-lg font-bold z-50 hover:bg-ping-blue-light active:bg-ping-blue-light transition"
20+
aria-label="Nach oben"
21+
>
22+
23+
</button>
24+
);
25+
}

0 commit comments

Comments
 (0)