mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-23 01:43:43 +00:00
Update PNotify to latest master (2014-12-25) and add desktop notifications.
This commit is contained in:
parent
3704e9a295
commit
65d30ddb47
3 changed files with 24 additions and 58 deletions
|
@ -52,6 +52,8 @@
|
||||||
* Change IPT urls to reduce 301 redirection
|
* Change IPT urls to reduce 301 redirection
|
||||||
* Add detection of file-system having no support for link creation (e.g. Unraid shares)
|
* Add detection of file-system having no support for link creation (e.g. Unraid shares)
|
||||||
* Add catch exceptions when unable to cache a requests response
|
* Add catch exceptions when unable to cache a requests response
|
||||||
|
* Update PNotify to latest master (2014-12-25) for desktop notifications
|
||||||
|
* Add desktop notifications
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
* Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed
|
* Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed
|
||||||
|
|
|
@ -7,6 +7,7 @@ PNotify.prototype.options.width = '340px';
|
||||||
PNotify.prototype.options.shadow = false;
|
PNotify.prototype.options.shadow = false;
|
||||||
PNotify.prototype.options.addclass = 'stack-bottomright';
|
PNotify.prototype.options.addclass = 'stack-bottomright';
|
||||||
PNotify.prototype.options.stack = {'dir1': 'up', 'dir2': 'left', 'firstpos1': 25, 'firstpos2': 25};
|
PNotify.prototype.options.stack = {'dir1': 'up', 'dir2': 'left', 'firstpos1': 25, 'firstpos2': 25};
|
||||||
|
PNotify.desktop.permission();
|
||||||
|
|
||||||
function check_notifications() {
|
function check_notifications() {
|
||||||
if(document.visibilityState == 'visible') {
|
if(document.visibilityState == 'visible') {
|
||||||
|
@ -16,8 +17,12 @@ function check_notifications() {
|
||||||
type: data.type,
|
type: data.type,
|
||||||
hide: data.type == 'notice',
|
hide: data.type == 'notice',
|
||||||
title: data.title,
|
title: data.title,
|
||||||
text: data.message,
|
text: data.message.replace(/<\/?i>/ig, '*'),
|
||||||
history: false
|
history: false,
|
||||||
|
desktop: {
|
||||||
|
desktop: true,
|
||||||
|
icon: '../images/ico/apple-touch-icon-180x180.png'
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
43
gui/slick/js/lib/pnotify.custom.min.js
vendored
43
gui/slick/js/lib/pnotify.custom.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue