navigationConfiguration.tsx 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import {t} from 'sentry/locale';
  2. import HookStore from 'sentry/stores/hookStore';
  3. import type {Organization} from 'sentry/types/organization';
  4. import type {NavigationSection} from 'sentry/views/settings/types';
  5. const pathPrefix = '/settings/account';
  6. type ConfigParams = {
  7. organization?: Organization;
  8. };
  9. function getConfiguration({organization}: ConfigParams): NavigationSection[] {
  10. return [
  11. {
  12. name: t('Account'),
  13. items: [
  14. {
  15. path: `${pathPrefix}/details/`,
  16. title: t('Account Details'),
  17. description: t(
  18. 'Change your account details and preferences (e.g. timezone/clock, avatar, language)'
  19. ),
  20. },
  21. {
  22. path: `${pathPrefix}/security/`,
  23. title: t('Security'),
  24. description: t('Change your account password and/or two factor authentication'),
  25. },
  26. {
  27. path: `${pathPrefix}/notifications/`,
  28. title: t('Notifications'),
  29. description: t('Configure what email notifications to receive'),
  30. },
  31. {
  32. path: `${pathPrefix}/emails/`,
  33. title: t('Email Addresses'),
  34. description: t(
  35. 'Add or remove secondary emails, change your primary email, verify your emails'
  36. ),
  37. },
  38. {
  39. path: `${pathPrefix}/subscriptions/`,
  40. title: t('Subscriptions'),
  41. description: t(
  42. 'Change Sentry marketing subscriptions you are subscribed to (GDPR)'
  43. ),
  44. },
  45. {
  46. path: `${pathPrefix}/authorizations/`,
  47. title: t('Authorized Applications'),
  48. description: t(
  49. 'Manage third-party applications that have access to your Sentry account'
  50. ),
  51. },
  52. {
  53. path: `${pathPrefix}/identities/`,
  54. title: t('Identities'),
  55. description: t(
  56. 'Manage your third-party identities that are associated to Sentry'
  57. ),
  58. },
  59. {
  60. path: `${pathPrefix}/close-account/`,
  61. title: t('Close Account'),
  62. description: t('Permanently close your Sentry account'),
  63. },
  64. ],
  65. },
  66. {
  67. name: t('API'),
  68. items: [
  69. {
  70. path: `${pathPrefix}/api/applications/`,
  71. title: t('Applications'),
  72. description: t('Add and configure OAuth2 applications'),
  73. },
  74. {
  75. path: `${pathPrefix}/api/auth-tokens/`,
  76. title: t('User Auth Tokens'),
  77. description: t(
  78. "Authentication tokens allow you to perform actions against the Sentry API on behalf of your account. They're the easiest way to get started using the API."
  79. ),
  80. },
  81. ...HookStore.get('settings:api-navigation-config').flatMap(cb =>
  82. cb(organization)
  83. ),
  84. ],
  85. },
  86. ];
  87. }
  88. export default getConfiguration;