storage-nav.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // @ts-nocheck
  2. import { SHORTCUT_REFERENCE_GROUPS } from '../referenceGroups'
  3. import { RegistryDefinations } from '../types'
  4. /**
  5. * Contextual chords for jumping between Storage sub-pages — `S + <letter>`.
  6. *
  7. * Active only while StorageLayout is mounted (i.e. the user is somewhere under
  8. * `/project/<ref>/storage/*`). Mirrors the database-nav / auth-nav pattern: the
  9. * leading `S` is layout-scoped so it doesn't burn a global key.
  10. */
  11. export const STORAGE_NAV_SHORTCUT_IDS = {
  12. NAV_STORAGE_FILES: 'nav.storage-files',
  13. NAV_STORAGE_ANALYTICS: 'nav.storage-analytics',
  14. NAV_STORAGE_VECTORS: 'nav.storage-vectors',
  15. NAV_STORAGE_S3: 'nav.storage-s3',
  16. }
  17. export type StorageNavShortcutId =
  18. (typeof STORAGE_NAV_SHORTCUT_IDS)[keyof typeof STORAGE_NAV_SHORTCUT_IDS]
  19. export const storageNavRegistry: RegistryDefinations<StorageNavShortcutId> = {
  20. [STORAGE_NAV_SHORTCUT_IDS.NAV_STORAGE_FILES]: {
  21. id: STORAGE_NAV_SHORTCUT_IDS.NAV_STORAGE_FILES,
  22. label: 'Go to Files',
  23. sequence: ['S', 'F'],
  24. showInSettings: false,
  25. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_STORAGE,
  26. },
  27. [STORAGE_NAV_SHORTCUT_IDS.NAV_STORAGE_ANALYTICS]: {
  28. id: STORAGE_NAV_SHORTCUT_IDS.NAV_STORAGE_ANALYTICS,
  29. label: 'Go to Analytics buckets',
  30. sequence: ['S', 'A'],
  31. showInSettings: false,
  32. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_STORAGE,
  33. },
  34. [STORAGE_NAV_SHORTCUT_IDS.NAV_STORAGE_VECTORS]: {
  35. id: STORAGE_NAV_SHORTCUT_IDS.NAV_STORAGE_VECTORS,
  36. label: 'Go to Vector buckets',
  37. sequence: ['S', 'V'],
  38. showInSettings: false,
  39. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_STORAGE,
  40. },
  41. [STORAGE_NAV_SHORTCUT_IDS.NAV_STORAGE_S3]: {
  42. id: STORAGE_NAV_SHORTCUT_IDS.NAV_STORAGE_S3,
  43. label: 'Go to S3 settings',
  44. sequence: ['S', '3'],
  45. showInSettings: false,
  46. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_STORAGE,
  47. },
  48. }