advisors-nav.ts44 lines · main
| 1 | // @ts-nocheck |
| 2 | import { SHORTCUT_REFERENCE_GROUPS } from '../referenceGroups' |
| 3 | import { RegistryDefinations } from '../types' |
| 4 | |
| 5 | /** |
| 6 | * Contextual chords for jumping between Advisors sub-pages — `V + <letter>`. |
| 7 | * |
| 8 | * Active only while AdvisorsLayout is mounted (i.e. the user is somewhere |
| 9 | * under `/project/<ref>/advisors/*`). Mirrors the database-nav / auth-nav |
| 10 | * pattern: the leading `V` (adVisor) is layout-scoped so it doesn't burn a |
| 11 | * global key. `A` is already in use by Auth. |
| 12 | */ |
| 13 | export const ADVISORS_NAV_SHORTCUT_IDS = { |
| 14 | NAV_ADVISORS_SECURITY: 'nav.advisors-security', |
| 15 | NAV_ADVISORS_PERFORMANCE: 'nav.advisors-performance', |
| 16 | NAV_ADVISORS_RULES: 'nav.advisors-rules', |
| 17 | } |
| 18 | |
| 19 | export type AdvisorsNavShortcutId = |
| 20 | (typeof ADVISORS_NAV_SHORTCUT_IDS)[keyof typeof ADVISORS_NAV_SHORTCUT_IDS] |
| 21 | |
| 22 | export const advisorsNavRegistry: RegistryDefinations<AdvisorsNavShortcutId> = { |
| 23 | [ADVISORS_NAV_SHORTCUT_IDS.NAV_ADVISORS_SECURITY]: { |
| 24 | id: ADVISORS_NAV_SHORTCUT_IDS.NAV_ADVISORS_SECURITY, |
| 25 | label: 'Go to Security Advisor', |
| 26 | sequence: ['V', 'S'], |
| 27 | showInSettings: false, |
| 28 | referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ADVISORS, |
| 29 | }, |
| 30 | [ADVISORS_NAV_SHORTCUT_IDS.NAV_ADVISORS_PERFORMANCE]: { |
| 31 | id: ADVISORS_NAV_SHORTCUT_IDS.NAV_ADVISORS_PERFORMANCE, |
| 32 | label: 'Go to Performance Advisor', |
| 33 | sequence: ['V', 'P'], |
| 34 | showInSettings: false, |
| 35 | referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ADVISORS, |
| 36 | }, |
| 37 | [ADVISORS_NAV_SHORTCUT_IDS.NAV_ADVISORS_RULES]: { |
| 38 | id: ADVISORS_NAV_SHORTCUT_IDS.NAV_ADVISORS_RULES, |
| 39 | label: 'Go to Advisor Settings', |
| 40 | sequence: ['V', 'R'], |
| 41 | showInSettings: false, |
| 42 | referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ADVISORS, |
| 43 | }, |
| 44 | } |