org-settings-nav.ts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // @ts-nocheck
  2. import { SHORTCUT_REFERENCE_GROUPS } from '../referenceGroups'
  3. import { RegistryDefinations } from '../types'
  4. /**
  5. * Contextual chords for jumping between Organization Settings sub-pages — `S + <letter>`.
  6. *
  7. * Active only while OrganizationSettingsLayout is mounted (i.e. the user is somewhere
  8. * under `/org/<slug>/general|security|sso|apps|...`). Mirrors the project-settings
  9. * pattern: `S` for Settings, scoped to the layout so it doesn't burn a global key.
  10. */
  11. export const ORG_SETTINGS_NAV_SHORTCUT_IDS = {
  12. NAV_ORG_SETTINGS_GENERAL: 'nav.org-settings-general',
  13. NAV_ORG_SETTINGS_SECURITY: 'nav.org-settings-security',
  14. NAV_ORG_SETTINGS_SSO: 'nav.org-settings-sso',
  15. NAV_ORG_SETTINGS_APPS: 'nav.org-settings-apps',
  16. NAV_ORG_SETTINGS_PRIVATE_APPS: 'nav.org-settings-private-apps',
  17. NAV_ORG_SETTINGS_WEBHOOKS: 'nav.org-settings-webhooks',
  18. NAV_ORG_SETTINGS_AUDIT: 'nav.org-settings-audit',
  19. NAV_ORG_SETTINGS_AUDIT_LOG_DRAINS: 'nav.org-settings-audit-log-drains',
  20. NAV_ORG_SETTINGS_DOCUMENTS: 'nav.org-settings-documents',
  21. } as const
  22. export type OrgSettingsNavShortcutId =
  23. (typeof ORG_SETTINGS_NAV_SHORTCUT_IDS)[keyof typeof ORG_SETTINGS_NAV_SHORTCUT_IDS]
  24. export const orgSettingsNavRegistry: RegistryDefinations<OrgSettingsNavShortcutId> = {
  25. [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_GENERAL]: {
  26. id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_GENERAL,
  27. label: 'Go to General',
  28. sequence: ['S', 'G'],
  29. showInSettings: false,
  30. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
  31. options: { ignoreInputs: true },
  32. },
  33. [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_SECURITY]: {
  34. id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_SECURITY,
  35. label: 'Go to Security',
  36. sequence: ['S', 'C'],
  37. showInSettings: false,
  38. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
  39. options: { ignoreInputs: true },
  40. },
  41. [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_SSO]: {
  42. id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_SSO,
  43. label: 'Go to SSO',
  44. sequence: ['S', 'S'],
  45. showInSettings: false,
  46. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
  47. options: { ignoreInputs: true },
  48. },
  49. [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_APPS]: {
  50. id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_APPS,
  51. label: 'Go to OAuth apps',
  52. sequence: ['S', 'A'],
  53. showInSettings: false,
  54. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
  55. options: { ignoreInputs: true },
  56. },
  57. [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_PRIVATE_APPS]: {
  58. id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_PRIVATE_APPS,
  59. label: 'Go to Private apps',
  60. sequence: ['S', 'P'],
  61. showInSettings: false,
  62. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
  63. options: { ignoreInputs: true },
  64. },
  65. [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_WEBHOOKS]: {
  66. id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_WEBHOOKS,
  67. label: 'Go to Webhooks',
  68. sequence: ['S', 'W'],
  69. showInSettings: false,
  70. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
  71. options: { ignoreInputs: true },
  72. },
  73. [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_AUDIT]: {
  74. id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_AUDIT,
  75. label: 'Go to Audit logs',
  76. sequence: ['S', 'L'],
  77. showInSettings: false,
  78. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
  79. options: { ignoreInputs: true },
  80. },
  81. [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_AUDIT_LOG_DRAINS]: {
  82. id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_AUDIT_LOG_DRAINS,
  83. label: 'Go to Audit log drains',
  84. sequence: ['S', 'N'],
  85. showInSettings: false,
  86. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
  87. options: { ignoreInputs: true },
  88. },
  89. [ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_DOCUMENTS]: {
  90. id: ORG_SETTINGS_NAV_SHORTCUT_IDS.NAV_ORG_SETTINGS_DOCUMENTS,
  91. label: 'Go to Legal documents',
  92. sequence: ['S', 'D'],
  93. showInSettings: false,
  94. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_ORG_SETTINGS,
  95. options: { ignoreInputs: true },
  96. },
  97. }