You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.js 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // @flow
  2. /**
  3. * The standard time when auto-disappearing notifications should disappear.
  4. */
  5. export const NOTIFICATION_TIMEOUT = {
  6. SHORT: 2500,
  7. MEDIUM: 5000,
  8. LONG: 10000,
  9. STICKY: false
  10. };
  11. /**
  12. * Notification timeout type.
  13. */
  14. export const NOTIFICATION_TIMEOUT_TYPE = {
  15. SHORT: 'short',
  16. MEDIUM: 'medium',
  17. LONG: 'long',
  18. STICKY: 'sticky'
  19. };
  20. /**
  21. * The set of possible notification types.
  22. *
  23. * @enum {string}
  24. */
  25. export const NOTIFICATION_TYPE = {
  26. ERROR: 'error',
  27. INFO: 'info',
  28. NORMAL: 'normal',
  29. SUCCESS: 'success',
  30. WARNING: 'warning'
  31. };
  32. /**
  33. * A mapping of notification type to priority of display.
  34. *
  35. * @enum {number}
  36. */
  37. export const NOTIFICATION_TYPE_PRIORITIES = {
  38. [NOTIFICATION_TYPE.ERROR]: 5,
  39. [NOTIFICATION_TYPE.INFO]: 3,
  40. [NOTIFICATION_TYPE.NORMAL]: 3,
  41. [NOTIFICATION_TYPE.SUCCESS]: 3,
  42. [NOTIFICATION_TYPE.WARNING]: 4
  43. };
  44. /**
  45. * The set of possible notification icons.
  46. *
  47. * @enum {string}
  48. */
  49. export const NOTIFICATION_ICON = {
  50. ...NOTIFICATION_TYPE,
  51. MESSAGE: 'message',
  52. PARTICIPANT: 'participant',
  53. PARTICIPANTS: 'participants'
  54. };
  55. /**
  56. * The identifier of the lobby notification.
  57. *
  58. * @type {string}
  59. */
  60. export const LOBBY_NOTIFICATION_ID = 'LOBBY_NOTIFICATION';
  61. /**
  62. * The identifier of the raise hand notification.
  63. *
  64. * @type {string}
  65. */
  66. export const RAISE_HAND_NOTIFICATION_ID = 'RAISE_HAND_NOTIFICATION';
  67. /**
  68. * Amount of participants beyond which no join notification will be emitted.
  69. */
  70. export const SILENT_JOIN_THRESHOLD = 30;
  71. /**
  72. * Amount of participants beyond which no left notification will be emitted.
  73. */
  74. export const SILENT_LEFT_THRESHOLD = 30;