diff options
| author | Fuwn <[email protected]> | 2025-05-15 03:00:29 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-05-15 03:00:34 -0700 |
| commit | b78aa74149bc006a2864af6af6e98a389767f3d8 (patch) | |
| tree | 098a0a131658857167d45e639f7336c346bb4062 /src/lib/Tools | |
| parent | refactor(CommandPalette): Move and rename action type (diff) | |
| download | due.moe-b78aa74149bc006a2864af6af6e98a389767f3d8.tar.xz due.moe-b78aa74149bc006a2864af6af6e98a389767f3d8.zip | |
refactor(CommandPalette): Globally rename action type
Diffstat (limited to 'src/lib/Tools')
| -rw-r--r-- | src/lib/Tools/tools.ts | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/Tools/tools.ts b/src/lib/Tools/tools.ts index 82ffef96..c5af7e34 100644 --- a/src/lib/Tools/tools.ts +++ b/src/lib/Tools/tools.ts @@ -1,14 +1,8 @@ +import type { CommandPaletteAction } from '$lib/CommandPalette/actions'; import locale from '$stores/locale'; import { get } from 'svelte/store'; -interface CommandPaletteItem { - name: string; - url: string; - onClick?: () => void; - preventDefault?: boolean; -} - -export const toolsAsCommandPaletteItemSet = () => +export const toolsAsCommandPaletteActions = (): CommandPaletteAction[] => Object.entries(tools) .filter(([id, tool]) => id !== 'default' && !tool.hidden) .map(([id, tool]) => ({ |