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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user