feat(#145): add DashboardResumeStrip component

- Component reads familienarchiv.lastVisited from localStorage and
  shows a 'Zuletzt geöffnet' link to the last-visited document
- Renders nothing when no localStorage entry exists
- Document detail page writes id+title to localStorage on mount

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-29 00:36:33 +01:00
parent 0610f0ee0f
commit 49f71e32ff
3 changed files with 87 additions and 0 deletions

View File

@@ -113,6 +113,14 @@ onMount(() => {
localStorageRestored = true;
// Track last-visited document for the dashboard resume strip
if (doc?.id) {
localStorage.setItem(
'familienarchiv.lastVisited',
JSON.stringify({ id: doc.id, title: doc.title ?? '' })
);
}
function onKeyDown(e: KeyboardEvent) {
if (e.key === 'Escape') {
if (activeAnnotationId) {