aboutsummaryrefslogtreecommitdiff
path: root/src/routes/+layout.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-04-26 12:40:27 +0000
committerFuwn <[email protected]>2026-04-26 12:40:27 +0000
commit5accc4e512e9bbff8d4303cb732edccaccd9b5a3 (patch)
tree3c51680e1cabb45941a7716cb769d04b8cb56c06 /src/routes/+layout.svelte
parentfix(tooltip): park off-screen on create, enable glide after first placement (diff)
downloaddue.moe-5accc4e512e9bbff8d4303cb732edccaccd9b5a3.tar.xz
due.moe-5accc4e512e9bbff8d4303cb732edccaccd9b5a3.zip
feat(command-palette): add quick toggles, sync, and auth actions
Adds 13 reactive quick toggles (24h time, animations, blur adult, cover modes, hover cover, schedule list, reverse sort, data saver, notifications, language, title format cycle, outbound link target cycle), three sync actions (push/pull/disable), and login/logout entries gated on auth state. Names reflect current state so the palette doubles as a status surface.
Diffstat (limited to 'src/routes/+layout.svelte')
-rw-r--r--src/routes/+layout.svelte13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 39a2e40b..78e08016 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -32,6 +32,9 @@ import { requestNotifications } from "$lib/Utility/notifications";
import { database as userDatabase } from "$lib/Database/IDB/user";
import CommandPalette from "$lib/CommandPalette/CommandPalette.svelte";
import { defaultActions } from "$lib/CommandPalette/actions";
+import { authActions } from "$lib/CommandPalette/authActions";
+import { syncActions } from "$lib/CommandPalette/syncActions";
+import { toggleActions } from "$lib/CommandPalette/toggleActions";
import { toolsAsCommandPaletteActions } from "$lib/Tools/tools";
import localforage from "localforage";
import { dev } from "$app/environment";
@@ -197,7 +200,15 @@ $: {
<HeadTitle />
-<CommandPalette items={defaultActions.concat(toolsAsCommandPaletteActions())} />
+<CommandPalette
+ items={[
+ ...defaultActions,
+ ...toolsAsCommandPaletteActions(),
+ ...authActions(data.user),
+ ...syncActions($userIdentity.id, $settings.settingsSync),
+ ...toggleActions($settings)
+ ]}
+/>
{#if !$locales.includes('en') || !$locale().navigation}
<Message />