diff --git a/docs/assets/img/background-dark.png b/docs/assets/img/background-dark.png index b0bfe9a..9376e5d 100644 Binary files a/docs/assets/img/background-dark.png and b/docs/assets/img/background-dark.png differ diff --git a/docs/assets/img/background-light.png b/docs/assets/img/background-light.png index 92e3609..98aa6b6 100644 Binary files a/docs/assets/img/background-light.png and b/docs/assets/img/background-light.png differ diff --git a/docs/assets/img/backups-dark.png b/docs/assets/img/backups-dark.png index f40d52c..3bcb7a9 100644 Binary files a/docs/assets/img/backups-dark.png and b/docs/assets/img/backups-dark.png differ diff --git a/docs/assets/img/backups-light.png b/docs/assets/img/backups-light.png index a2e2459..719d87d 100644 Binary files a/docs/assets/img/backups-light.png and b/docs/assets/img/backups-light.png differ diff --git a/frontend/src/components/Settings.svelte b/frontend/src/components/Settings.svelte index b23a8a8..a673906 100644 --- a/frontend/src/components/Settings.svelte +++ b/frontend/src/components/Settings.svelte @@ -40,6 +40,26 @@ type Tab = 'general' | 'storage' | 'backups' | 'background' | 'sources' | 'about'; let activeTab: Tab = 'general'; + const TABS: { id: Tab; label: string }[] = [ + { id: 'general', label: 'settings.general' }, + { id: 'storage', label: 'settings.storage' }, + { id: 'backups', label: 'backup.tab' }, + { id: 'background', label: 'background.tab' }, + { id: 'sources', label: 'sources.tab' }, + { id: 'about', label: 'settings.about' }, + ]; + let tabButtons: HTMLButtonElement[] = []; + + // Up and down move along the list, as in any vertical tab list. + function onTabKeydown(e: KeyboardEvent) { + const step = e.key === 'ArrowDown' ? 1 : e.key === 'ArrowUp' ? -1 : 0; + if (!step) return; + e.preventDefault(); + const i = TABS.findIndex(t => t.id === activeTab); + const next = (i + step + TABS.length) % TABS.length; + activeTab = TABS[next].id; + tabButtons[next]?.focus(); + } $: if (visible && initialTab) activeTab = initialTab; // A dialog open inside the Background or Backups tab takes Escape first. let backgroundOverlayOpen = false; @@ -486,34 +506,17 @@ -
- - - - - - +
+ {#each TABS as tab, i (tab.id)} + + {/each}
-