mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 05:45:31 +02:00
Updates cleanup
This commit is contained in:
26
src/UI/Handlebars/Helpers/System.js
Normal file
26
src/UI/Handlebars/Helpers/System.js
Normal file
@@ -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 '';
|
||||
});
|
||||
});
|
@@ -9,7 +9,7 @@ define(
|
||||
'Handlebars/Helpers/Episode',
|
||||
'Handlebars/Helpers/Series',
|
||||
'Handlebars/Helpers/Quality',
|
||||
'Handlebars/Helpers/Version',
|
||||
'Handlebars/Helpers/System',
|
||||
'Handlebars/Handlebars.Debug'
|
||||
], function (Templates) {
|
||||
return function () {
|
||||
|
Reference in New Issue
Block a user