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

26 lines
527 B
JavaScript
Raw Normal View History

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
};