2019-03-27 14:00:10 +00:00
|
|
|
// @flow
|
|
|
|
|
2019-03-29 13:37:50 +00:00
|
|
|
/**
|
|
|
|
* The standard time when auto-disappearing notifications should disappear.
|
|
|
|
*/
|
2021-11-24 11:05:27 +00:00
|
|
|
export const NOTIFICATION_TIMEOUT = {
|
|
|
|
SHORT: 2500,
|
|
|
|
MEDIUM: 5000,
|
|
|
|
LONG: 10000,
|
|
|
|
STICKY: false
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notification timeout type.
|
|
|
|
*/
|
|
|
|
export const NOTIFICATION_TIMEOUT_TYPE = {
|
|
|
|
SHORT: 'short',
|
|
|
|
MEDIUM: 'medium',
|
|
|
|
LONG: 'long',
|
|
|
|
STICKY: 'sticky'
|
|
|
|
};
|
2019-03-29 13:37:50 +00:00
|
|
|
|
2017-11-03 19:05:03 +00:00
|
|
|
/**
|
|
|
|
* The set of possible notification types.
|
|
|
|
*
|
|
|
|
* @enum {string}
|
|
|
|
*/
|
|
|
|
export const NOTIFICATION_TYPE = {
|
|
|
|
ERROR: 'error',
|
|
|
|
INFO: 'info',
|
|
|
|
NORMAL: 'normal',
|
|
|
|
SUCCESS: 'success',
|
|
|
|
WARNING: 'warning'
|
|
|
|
};
|
2017-11-27 16:47:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A mapping of notification type to priority of display.
|
|
|
|
*
|
|
|
|
* @enum {number}
|
|
|
|
*/
|
|
|
|
export const NOTIFICATION_TYPE_PRIORITIES = {
|
|
|
|
[NOTIFICATION_TYPE.ERROR]: 5,
|
|
|
|
[NOTIFICATION_TYPE.INFO]: 3,
|
|
|
|
[NOTIFICATION_TYPE.NORMAL]: 3,
|
|
|
|
[NOTIFICATION_TYPE.SUCCESS]: 3,
|
|
|
|
[NOTIFICATION_TYPE.WARNING]: 4
|
|
|
|
};
|
2021-09-02 12:47:11 +00:00
|
|
|
|
2021-12-17 12:39:15 +00:00
|
|
|
/**
|
|
|
|
* The set of possible notification icons.
|
|
|
|
*
|
|
|
|
* @enum {string}
|
|
|
|
*/
|
|
|
|
export const NOTIFICATION_ICON = {
|
|
|
|
...NOTIFICATION_TYPE,
|
2022-01-20 14:26:03 +00:00
|
|
|
MESSAGE: 'message',
|
|
|
|
PARTICIPANT: 'participant',
|
|
|
|
PARTICIPANTS: 'participants'
|
2021-12-17 12:39:15 +00:00
|
|
|
};
|
|
|
|
|
2022-01-20 14:26:03 +00:00
|
|
|
/**
|
|
|
|
* The identifier of the lobby notification.
|
|
|
|
*
|
|
|
|
* @type {string}
|
|
|
|
*/
|
|
|
|
export const LOBBY_NOTIFICATION_ID = 'LOBBY_NOTIFICATION';
|
|
|
|
|
2021-12-02 13:17:07 +00:00
|
|
|
/**
|
|
|
|
* The identifier of the raise hand notification.
|
|
|
|
*
|
|
|
|
* @type {string}
|
|
|
|
*/
|
|
|
|
export const RAISE_HAND_NOTIFICATION_ID = 'RAISE_HAND_NOTIFICATION';
|
|
|
|
|
2021-09-02 12:47:11 +00:00
|
|
|
/**
|
|
|
|
* Amount of participants beyond which no join notification will be emitted.
|
|
|
|
*/
|
|
|
|
export const SILENT_JOIN_THRESHOLD = 30;
|
2021-12-02 13:17:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Amount of participants beyond which no left notification will be emitted.
|
|
|
|
*/
|
|
|
|
export const SILENT_LEFT_THRESHOLD = 30;
|