jiti-meet/react/features/notifications/constants.js

84 lines
1.6 KiB
JavaScript
Raw Normal View History

2019-03-27 14:00:10 +00:00
// @flow
/**
* The standard time when auto-disappearing notifications should disappear.
*/
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'
};
ref(notifications): convert some dialogs to error or warning notifica… (#1991) * ref(notifications): convert some dialogs to error or warning notifications - Expand the configurability of the Notification component so warnings and errors can be displayed. - Allow Notification to take in arbitrary text for the body. - Rename defaultTitleKey to titleKey for consistency with descriptionKey. * ref(notifications): remove openReportDialog method openReportDialog is a wrapper around showError that adds a logger statement. It is being called in one place only so remove the method and have that one place call logger. * ref(notifications): UI.showTrackNotWorkingDialog takes a boolean Change UI.showTrackNotWorkingDialog so it takes a boolean arguments instead of the entire track. A small refactor so the method needs to know less. * [squash] Fixes eslint errors * WiP: Fixes desktop sharing error strings and adds support button * [squash] Fix icons appearances * [squash] Fix translate titles and messages * [squash] fix(translation): Fixes incorrect password string * [squash] fix(recording): Fixes recording message * [squash] fix(warning): Turns some warnings to errors and makes support link optional. * [squash] fix(translation): Addressing language comments * [squash] Fixes jsdoc and formatting * [squash] fix(noopener): Fixes window.open noopener * [squash] fix(constants): Extract constants and refactor NotificationWithToggle * [squash] fix(lang): Fixes camera and mic error titles * [squash] fix(supportLink): Renames addSupportLink to hideErrorSupportLink
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'
};
/**
* 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
};
/**
* The set of possible notification icons.
*
* @enum {string}
*/
export const NOTIFICATION_ICON = {
...NOTIFICATION_TYPE,
MESSAGE: 'message',
PARTICIPANT: 'participant',
PARTICIPANTS: 'participants'
};
/**
* The identifier of the lobby notification.
*
* @type {string}
*/
export const LOBBY_NOTIFICATION_ID = 'LOBBY_NOTIFICATION';
/**
* The identifier of the raise hand notification.
*
* @type {string}
*/
export const RAISE_HAND_NOTIFICATION_ID = 'RAISE_HAND_NOTIFICATION';
/**
* Amount of participants beyond which no join notification will be emitted.
*/
export const SILENT_JOIN_THRESHOLD = 30;
/**
* Amount of participants beyond which no left notification will be emitted.
*/
export const SILENT_LEFT_THRESHOLD = 30;