functions-list.ts 1.2 KB

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