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