diff options
| author | Fuwn <[email protected]> | 2025-05-15 03:21:48 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-05-15 03:21:48 -0700 |
| commit | d2971dad8292f36fca0599aeaaae11e27510c20d (patch) | |
| tree | 86f96847cad96f291bda5cc35e79bdd33598b889 /src | |
| parent | feat(CommandPalette): Enhanced nested visual indicators (diff) | |
| download | due.moe-d2971dad8292f36fca0599aeaaae11e27510c20d.tar.xz due.moe-d2971dad8292f36fca0599aeaaae11e27510c20d.zip | |
feat(CommandPalette): Add additional nested actions
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/CommandPalette/CommandPalette.svelte | 3 | ||||
| -rw-r--r-- | src/lib/CommandPalette/actions.ts | 47 |
2 files changed, 45 insertions, 5 deletions
diff --git a/src/lib/CommandPalette/CommandPalette.svelte b/src/lib/CommandPalette/CommandPalette.svelte index f493bcac..6dda7f8f 100644 --- a/src/lib/CommandPalette/CommandPalette.svelte +++ b/src/lib/CommandPalette/CommandPalette.svelte @@ -38,13 +38,12 @@ if (action.actions) action.actions.forEach((nestedAction, nestedIdx) => { - if (doesActionMatch(nestedAction)) { + if (doesActionMatch(nestedAction)) filtered.push({ ...nestedAction, id: `action-${idx}-nested-${nestedIdx}`, name: `${matchedParent ? '↳' : `${action.name} >`} ${nestedAction.name}` }); - } }); }); } diff --git a/src/lib/CommandPalette/actions.ts b/src/lib/CommandPalette/actions.ts index 16179864..49efa536 100644 --- a/src/lib/CommandPalette/actions.ts +++ b/src/lib/CommandPalette/actions.ts @@ -11,12 +11,46 @@ export const defaultActions: CommandPaletteAction[] = [ { name: 'Home', url: '/', - tags: ['main', 'manga', 'anime', 'light', 'dashboard', 'start', 'begin', 'novels'] + tags: ['main', 'manga', 'anime', 'light', 'dashboard', 'start', 'begin', 'novels', 'list'], + actions: [ + { + name: 'Upcoming Episodes', + url: '/', + tags: ['anime', 'list'] + }, + { + name: 'Not Yet Released', + url: '/', + tags: ['anime', 'schedule', 'list'] + }, + { + name: 'Due Episodes', + url: '/', + tags: ['anime', 'list'] + }, + { + name: 'Manga & Light Novels', + url: '/', + tags: ['novels', 'manga', 'list'] + } + ] }, { name: 'Completed', url: '/completed', - tags: ['finish', 'end', 'done', 'finish', 'end', 'done', 'anime', 'novels', 'manga'] + tags: ['finish', 'end', 'done', 'finish', 'end', 'done', 'anime', 'novels', 'manga'], + actions: [ + { + name: 'Anime', + url: '/completed', + tags: ['anime', 'list'] + }, + { + name: 'Manga & Light Novels', + url: '/completed', + tags: ['novels', 'manga', 'list'] + } + ] }, { name: 'Subtitle Schedule', @@ -97,7 +131,14 @@ export const defaultActions: CommandPaletteAction[] = [ { name: 'My Profile', url: '/user', - tags: ['user', 'me', 'settings'] + tags: ['user', 'me', 'settings'], + actions: [ + { + name: 'User Preferences', + url: '/user', + tags: ['user', 'me', 'settings'] + } + ] }, { name: 'My Badge Wall', |