Fixed: moment.js deprecated zone and Added: and lossless compression of images (#2232) (Fixes #2231)

pull/2111/merge
Fish2 7 years ago committed by Leonardo Galli
parent 29909db604
commit 32b1f75eb3

@ -12,7 +12,7 @@ module.exports = NzbDroneCell.extend({
if (dateStr) {
var date = moment(dateStr);
var diff = date.diff(moment().zone(date.zone()).startOf('day'), 'days', true);
var diff = date.diff(moment().utcOffset() == - moment.tz.zone()).startOf('day'), 'days', true);
var result = '<span title="{0}">{1}</span>';
var tooltip = date.format(UiSettings.longDateTime());
var text;

@ -20,7 +20,7 @@ var singleton = function() {
var attr = _.extend({ name : name.toLocaleLowerCase() }, properties);
var commandModel = new CommandModel(attr);
if (this._lastCommand.command && this._lastCommand.command.isSameCommand(attr) && moment().add('seconds', -5).isBefore(this._lastCommand.time)) {
if (this._lastCommand.command && this._lastCommand.command.isSameCommand(attr) && moment().add(-5, 'seconds').isBefore(this._lastCommand.time)) {
Messenger.show({
message : 'Please wait at least 5 seconds before running this command again',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 736 B

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 805 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 678 B

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -214,8 +214,8 @@ module.exports = Marionette.Layout.extend({
},
_shouldShowEpisodes : function() {
var startDate = moment().add('month', -1);
var endDate = moment().add('year', 1);
var startDate = moment().add(-1, 'month');
var endDate = moment().add(1, 'year');
return this.episodeCollection.some(function(episode) {
var airDate = episode.get('airDateUtc');

@ -214,8 +214,8 @@ module.exports = Marionette.Layout.extend({
},
_shouldShowEpisodes : function() {
var startDate = moment().add('month', -1);
var endDate = moment().add('year', 1);
var startDate = moment().add(-1, 'month');
var endDate = moment().add(1, 'year');
return this.episodeCollection.some(function(episode) {
var airDate = episode.get('airDateUtc');

@ -40,7 +40,7 @@ module.exports = {
return 'in ' + date.fromNow(true);
}
if (date.isBefore(moment().add('years', -1))) {
if (date.isBefore(moment().add(-1, 'years'))) {
return date.format(UiSettings.get('shortDateFormat'));
}

@ -9,7 +9,7 @@ module.exports = NzbDroneCell.extend({
render : function() {
var dateStr = this._getValue();
var date = moment(dateStr);
var diff = date.diff(moment().zone(date.zone()).startOf('day'), 'days', true);
var diff = date.diff(moment().utcOffset() == - moment.tz.zone()).startOf('day'), 'days', true);
var result = '<span title="{0}">{1}</span>';
var tooltip = date.format(UiSettings.longDateTime(true));
var text;

Loading…
Cancel
Save