mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Updates cleanup
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
'handlebars',
|
||||
'System/StatusModel'
|
||||
], function (Handlebars, StatusModel) {
|
||||
|
||||
Handlebars.registerHelper('if_windows', function(options) {
|
||||
if (StatusModel.get('isWindows'))
|
||||
{
|
||||
return options.fn(this);
|
||||
}
|
||||
|
||||
return options.inverse(this);
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('if_linux', function(options) {
|
||||
if (StatusModel.get('isLinux'))
|
||||
{
|
||||
return options.fn(this);
|
||||
}
|
||||
|
||||
return options.inverse(this);
|
||||
});
|
||||
});
|
||||
@@ -1,22 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
'handlebars'
|
||||
], function (Handlebars) {
|
||||
|
||||
Handlebars.registerHelper('currentVersion', function (version, latest) {
|
||||
var currentVersion = window.NzbDrone.ServerStatus.version;
|
||||
|
||||
if (currentVersion === version)
|
||||
{
|
||||
return new Handlebars.SafeString('<i class="icon-ok" title="Installed"></i>');
|
||||
}
|
||||
|
||||
if (latest) {
|
||||
return new Handlebars.SafeString('<span class="label label-inverse install-update x-install-update">Install</span>');
|
||||
}
|
||||
|
||||
return '';
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user