mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
added command support to toolbar.
This commit is contained in:
parent
a816a83f3a
commit
c8a48d5df3
6 changed files with 136 additions and 36 deletions
27
UI/Shared/Messenger.js
Normal file
27
UI/Shared/Messenger.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
"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
|
||||
});
|
||||
}};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue