functions-list.ts34 lines · main
| 1 | // @ts-nocheck |
| 2 | import { RegistryDefinations } from '../types' |
| 3 | |
| 4 | /** |
| 5 | * Shortcuts scoped to the Edge Functions overview (list) page. |
| 6 | * |
| 7 | * The shared list-page shortcuts (focus search, create new item, reset |
| 8 | * filters) are reused directly from `list-page.ts`. Only functions-specific |
| 9 | * actions live here. |
| 10 | */ |
| 11 | export const FUNCTIONS_LIST_SHORTCUT_IDS = { |
| 12 | FUNCTIONS_LIST_REFRESH: 'functions-list.refresh', |
| 13 | FUNCTIONS_LIST_CLEAR_SORT: 'functions-list.clear-sort', |
| 14 | } |
| 15 | |
| 16 | export type FunctionsListShortcutId = |
| 17 | (typeof FUNCTIONS_LIST_SHORTCUT_IDS)[keyof typeof FUNCTIONS_LIST_SHORTCUT_IDS] |
| 18 | |
| 19 | export const functionsListRegistry: RegistryDefinations<FunctionsListShortcutId> = { |
| 20 | [FUNCTIONS_LIST_SHORTCUT_IDS.FUNCTIONS_LIST_REFRESH]: { |
| 21 | id: FUNCTIONS_LIST_SHORTCUT_IDS.FUNCTIONS_LIST_REFRESH, |
| 22 | label: 'Refresh functions', |
| 23 | sequence: ['Shift+R'], |
| 24 | showInSettings: false, |
| 25 | options: { ignoreInputs: true, registerInCommandMenu: true }, |
| 26 | }, |
| 27 | [FUNCTIONS_LIST_SHORTCUT_IDS.FUNCTIONS_LIST_CLEAR_SORT]: { |
| 28 | id: FUNCTIONS_LIST_SHORTCUT_IDS.FUNCTIONS_LIST_CLEAR_SORT, |
| 29 | label: 'Clear sort', |
| 30 | sequence: ['S', 'C'], |
| 31 | showInSettings: false, |
| 32 | options: { ignoreInputs: true, registerInCommandMenu: true }, |
| 33 | }, |
| 34 | } |