aboutsummaryrefslogtreecommitdiff
path: root/src/lib/CommandPalette/actions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/CommandPalette/actions.ts')
-rw-r--r--src/lib/CommandPalette/actions.ts324
1 files changed, 181 insertions, 143 deletions
diff --git a/src/lib/CommandPalette/actions.ts b/src/lib/CommandPalette/actions.ts
index 49efa536..9915fe66 100644
--- a/src/lib/CommandPalette/actions.ts
+++ b/src/lib/CommandPalette/actions.ts
@@ -1,148 +1,186 @@
+import { invalidateListCaches } from "$lib/Media/invalidate";
+
export interface CommandPaletteAction {
- name: string;
- url: string;
- onClick?: () => void;
- preventDefault?: boolean;
- tags?: string[];
- actions?: CommandPaletteAction[];
+ name: string;
+ url: string;
+ onClick?: () => void;
+ preventDefault?: boolean;
+ tags?: string[];
+ actions?: CommandPaletteAction[];
}
export const defaultActions: CommandPaletteAction[] = [
- {
- name: 'Home',
- url: '/',
- 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'],
- actions: [
- {
- name: 'Anime',
- url: '/completed',
- tags: ['anime', 'list']
- },
- {
- name: 'Manga & Light Novels',
- url: '/completed',
- tags: ['novels', 'manga', 'list']
- }
- ]
- },
- {
- name: 'Subtitle Schedule',
- url: '/schedule',
- tags: ['anime', 'subs']
- },
- {
- name: 'hololive Schedule',
- url: '/hololive',
- tags: ['vtuber', 'youtube', 'virtual', 'twitch', 'stream']
- },
- {
- name: 'Character Birthdays',
- url: '/birthdays',
- tags: ['schedule', 'vtuber', 'date']
- },
- {
- name: 'New Releases',
- url: '/releases',
- tags: ['novels', 'manga', 'date', 'schedule', 'time']
- },
- {
- name: 'Settings',
- url: '/settings',
- tags: [
- 'sync',
- 'display',
- 'hide',
- 'panels',
- 'motion',
- 'accessibility',
- 'notifications',
- 'rss',
- 'warning',
- 'show',
- 'links',
- 'sort',
- 'calculation',
- 'cache',
- 'clear',
- 'debug',
- 'language',
- 'locale'
- ],
- actions: [
- {
- name: 'Settings Sync',
- url: '/settings#sync',
- tags: ['settings']
- },
- {
- name: 'RSS Feeds',
- url: '/settings#feeds',
- tags: ['settings']
- },
- {
- name: 'Display',
- url: '/settings',
- tags: ['settings']
- },
- {
- name: 'Calculation',
- url: '/settings',
- tags: ['settings']
- },
- {
- name: 'Cache',
- url: '/settings',
- tags: ['settings']
- },
- {
- name: 'Debug',
- url: '/settings#debug',
- tags: ['settings']
- }
- ]
- },
- {
- name: 'My Profile',
- url: '/user',
- tags: ['user', 'me', 'settings'],
- actions: [
- {
- name: 'User Preferences',
- url: '/user',
- tags: ['user', 'me', 'settings']
- }
- ]
- },
- {
- name: 'My Badge Wall',
- url: '/user?badges=1',
- tags: ['user', 'me', 'settings']
- }
+ {
+ name: "Home",
+ url: "/",
+ 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",
+ ],
+ actions: [
+ {
+ name: "Anime",
+ url: "/completed",
+ tags: ["anime", "list"],
+ },
+ {
+ name: "Manga & Light Novels",
+ url: "/completed",
+ tags: ["novels", "manga", "list"],
+ },
+ ],
+ },
+ {
+ name: "Subtitle Schedule",
+ url: "/schedule",
+ tags: ["anime", "subs"],
+ },
+ {
+ name: "hololive Schedule",
+ url: "/hololive",
+ tags: ["vtuber", "youtube", "virtual", "twitch", "stream"],
+ },
+ {
+ name: "Character Birthdays",
+ url: "/birthdays",
+ tags: ["schedule", "vtuber", "date"],
+ },
+ {
+ name: "New Releases",
+ url: "/releases",
+ tags: ["novels", "manga", "date", "schedule", "time"],
+ },
+ {
+ name: "Settings",
+ url: "/settings",
+ tags: [
+ "sync",
+ "display",
+ "hide",
+ "panels",
+ "motion",
+ "accessibility",
+ "notifications",
+ "rss",
+ "warning",
+ "show",
+ "links",
+ "sort",
+ "calculation",
+ "cache",
+ "clear",
+ "debug",
+ "language",
+ "locale",
+ ],
+ actions: [
+ {
+ name: "Settings Sync",
+ url: "/settings#sync",
+ tags: ["settings"],
+ },
+ {
+ name: "RSS Feeds",
+ url: "/settings#feeds",
+ tags: ["settings"],
+ },
+ {
+ name: "Display",
+ url: "/settings",
+ tags: ["settings"],
+ },
+ {
+ name: "Calculation",
+ url: "/settings",
+ tags: ["settings"],
+ },
+ {
+ name: "Cache",
+ url: "/settings",
+ tags: ["settings"],
+ },
+ {
+ name: "Debug",
+ url: "/settings#debug",
+ tags: ["settings"],
+ },
+ ],
+ },
+ {
+ name: "My Profile",
+ url: "/user",
+ tags: ["user", "me", "settings"],
+ actions: [
+ {
+ name: "User Preferences",
+ url: "/user",
+ tags: ["user", "me", "settings"],
+ },
+ ],
+ },
+ {
+ name: "My Badge Wall",
+ url: "/user?badges=1",
+ tags: ["user", "me", "settings"],
+ },
+ {
+ name: "Refresh Anime & Manga List Caches",
+ url: "",
+ preventDefault: true,
+ tags: [
+ "cache",
+ "clear",
+ "refresh",
+ "invalidate",
+ "debug",
+ "anime",
+ "manga",
+ "list",
+ ],
+ onClick: invalidateListCaches,
+ },
];