MCPcopy
hub / github.com/lumapps/lumX / _notify

Function _notify

components/notification/js/notification_service.js:152–164  ·  view source on GitHub ↗

* Check if an existing notification is displayed before building. * * @param {string} content The notification content. * @param {string} type The notification type, either info, success, warning or error. * @param {string} [actionLabel] The action b

(content, type, actionLabel, actionCallback)

Source from the content-addressed store, hash-verified

150 * @param {Function} [actionCallback] The action button callback function called on action button click.
151 */
152 function _notify(content, type, actionLabel, actionCallback) {
153 const activeNotification = angular.element(`.${CSS_PREFIX}-notification`);
154
155 if (activeNotification.length > 0) {
156 _hide(activeNotification);
157
158 $timeout(function waitBeforeShowingNext() {
159 _build(content, type, actionLabel, actionCallback);
160 }, _TRANSITION_DURATION);
161 } else {
162 _build(content, type, actionLabel, actionCallback);
163 }
164 }
165
166 /////////////////////////////
167 // //

Callers 4

errorNotificationFunction · 0.85
infoNotificationFunction · 0.85
successNotificationFunction · 0.85
warningNotificationFunction · 0.85

Calls 2

_hideFunction · 0.85
_buildFunction · 0.85

Tested by

no test coverage detected