1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-25 22:46:31 -04:00

removed legacy UI components

This commit is contained in:
Keivan Beigi
2017-02-23 16:56:47 -08:00
committed by Taloth Saldono
parent ab12c51e0f
commit 50d4d7a19d
16 changed files with 8 additions and 332 deletions
@@ -1,21 +0,0 @@
var Handlebars = require('handlebars');
var FormatHelpers = require('Shared/FormatHelpers');
Handlebars.registerHelper('historyAge', function() {
var age = this.age;
var unit = FormatHelpers.plural(Math.round(age), 'day');
var ageHours = parseFloat(this.ageHours);
var ageMinutes = this.ageMinutes ? parseFloat(this.ageMinutes) : null;
if (age < 2) {
age = ageHours.toFixed(1);
unit = FormatHelpers.plural(Math.round(ageHours), 'hour');
}
if (age < 2 && ageMinutes) {
age = parseFloat(ageMinutes).toFixed(1);
unit = FormatHelpers.plural(Math.round(ageMinutes), 'minute');
}
return new Handlebars.SafeString(`<dt>Age (when grabbed):</dt><dd>${age} ${unit}</dd>`);
});