mirror of
https://github.com/Radarr/Radarr
synced 2024-12-27 10:19:41 +00:00
27 lines
769 B
JavaScript
27 lines
769 B
JavaScript
"use strict";
|
|
define(['app'], function () {
|
|
NzbDrone.Shared.Messenger = {
|
|
show: function (options) {
|
|
|
|
if (!options.type) {
|
|
options.type = 'info';
|
|
}
|
|
|
|
if (!options.hideAfter) {
|
|
switch (options.type) {
|
|
case 'info':
|
|
options.hideAfter = 5;
|
|
break;
|
|
case 'error':
|
|
options.hideAfter = 0;
|
|
}
|
|
}
|
|
|
|
return window.Messenger().post({
|
|
message : options.message,
|
|
type : options.type,
|
|
showCloseButton: true,
|
|
hideAfter : options.hideAfter
|
|
});
|
|
}};
|
|
});
|