constants.tsx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import {t} from 'sentry/locale';
  2. export const ALL_PROVIDERS = {
  3. email: 'default',
  4. slack: 'never',
  5. msteams: 'never',
  6. };
  7. export const ALL_PROVIDER_NAMES = Object.keys(ALL_PROVIDERS);
  8. /**
  9. * These values are stolen from the DB.
  10. */
  11. export const VALUE_MAPPING = {
  12. default: 0,
  13. never: 10,
  14. always: 20,
  15. subscribe_only: 30,
  16. committed_only: 40,
  17. };
  18. export const MIN_PROJECTS_FOR_CONFIRMATION = 3;
  19. export const MIN_PROJECTS_FOR_SEARCH = 3;
  20. export const MIN_PROJECTS_FOR_PAGINATION = 100;
  21. export type NotificationSettingsByProviderObject = {[key: string]: string};
  22. export type NotificationSettingsObject = {
  23. [key: string]: {[key: string]: {[key: string]: NotificationSettingsByProviderObject}};
  24. };
  25. export const NOTIFICATION_SETTINGS_TYPES = [
  26. 'alerts',
  27. 'activeRelease',
  28. 'workflow',
  29. 'deploy',
  30. 'approval',
  31. 'quota',
  32. 'reports',
  33. 'email',
  34. ];
  35. export const SELF_NOTIFICATION_SETTINGS_TYPES = [
  36. 'personalActivityNotifications',
  37. 'selfAssignOnResolve',
  38. ];
  39. export const CONFIRMATION_MESSAGE = (
  40. <div>
  41. <p style={{marginBottom: '20px'}}>
  42. <strong>Are you sure you want to disable these notifications?</strong>
  43. </p>
  44. <p>
  45. {t(
  46. 'Turning this off will irreversibly overwrite all of your fine-tuning settings to "off".'
  47. )}
  48. </p>
  49. </div>
  50. );