feat(history): expose complete history deletion

Add a permanent danger action to the History toolbar so users can clear all saved entries without selecting rows or expanding the sidebar. Reuse the existing confirmation and storage path, disable the action while history is empty or loading, localize the label in English, and cover the interaction with focused regression tests.
This commit is contained in:
Sucukdeluxe
2026-08-11 16:18:38 +02:00
parent 6c5946c88d
commit b5b1ff88e5
7 changed files with 39 additions and 5 deletions
@@ -97,6 +97,7 @@ export function HistoryToolbar({ model, actions }: HistoryViewProps): ReactEleme
<button className="history-action" disabled={selectedIds.length !== 1} onClick={() => actions.onReveal(selectedIds[0])} type="button">Im Ordner zeigen</button>
<button className="history-action history-action-danger" disabled={selectedIds.length === 0} onClick={() => actions.onRemove(selectedIds)} type="button">Entfernen</button>
<button className="history-action" disabled={selectedIds.length === 0} onClick={actions.onClearSelection} type="button">Auswahl löschen</button>
<button className="history-action history-action-danger" disabled={model.totalCount === 0 || model.loading} onClick={actions.onClearHistory} type="button">Gesamtverlauf löschen</button>
</ToolbarGroup>
<ToolbarSearch
label="Verlauf durchsuchen"