diff --git a/app/MainClient.tsx b/app/MainClient.tsx index 62e6600..c5eb63f 100644 --- a/app/MainClient.tsx +++ b/app/MainClient.tsx @@ -29,12 +29,12 @@ export default function MainClient({ kuerzel, beoId, beoName }: Props) { function handleSaved() { setRefreshKey((k) => k + 1); setEditEntry(null); - if (editEntry) setActiveTab('liste'); } function handleEdit(entry: LogbuchEintrag) { setEditEntry(entry); setActiveTab('eingabe'); + window.scrollTo({ top: 0, behavior: 'smooth' }); } async function handleLogout() { @@ -84,11 +84,11 @@ export default function MainClient({ kuerzel, beoId, beoName }: Props) { {/* Eingabe/Liste-Tabs */} -
+
{(['eingabe', 'liste'] as const).map((tab) => (
+ {/* Eingabe-Tab: Formular + kompakte Vorschau-Liste (nur Desktop) */} {activeTab === 'eingabe' && ( -
+ <> {editEntry && ( -
+
Eintrag bearbeiten (ID {editEntry.ID})
)} @@ -114,18 +115,40 @@ export default function MainClient({ kuerzel, beoId, beoName }: Props) { editEntry={editEntry} onSaved={handleSaved} /> -
+ + {/* Kompakte Liste — nur auf Desktop sichtbar */} +
+
+

Letzte Einträge

+ +
+ +
+ )} + {/* Liste-Tab: vollständige Liste */} {activeTab === 'liste' && ( )} -