mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added unaired/missing indicators
This commit is contained in:
parent
b23426bb93
commit
eeb941062b
3 changed files with 34 additions and 11 deletions
|
@ -638,7 +638,14 @@ a.itemTag:hover {
|
||||||
|
|
||||||
.offlinePosterRibbon {
|
.offlinePosterRibbon {
|
||||||
background: rgb(255, 106, 0);
|
background: rgb(255, 106, 0);
|
||||||
background: rgba(255, 106, 0, .85);
|
}
|
||||||
|
|
||||||
|
.unairedPosterRibbon {
|
||||||
|
background: rgb(208, 107, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
.missingPosterRibbon {
|
||||||
|
background: rgb(248, 58, 34);
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemProgress {
|
.itemProgress {
|
||||||
|
|
|
@ -180,18 +180,22 @@
|
||||||
|
|
||||||
$('#chkMissingEpisode', this).on('change', function () {
|
$('#chkMissingEpisode', this).on('change', function () {
|
||||||
|
|
||||||
query.LocationTypes = this.checked ? "virtual" : null;
|
var futureChecked = $('#chkFutureEpisode', page).checked();
|
||||||
|
|
||||||
|
query.LocationTypes = this.checked || futureChecked ? "virtual" : null;
|
||||||
|
query.HasPremiereDate = this.checked || futureChecked ? true : null;
|
||||||
query.MaxPremiereDate = this.checked ? getDateFormat(new Date()) : null;
|
query.MaxPremiereDate = this.checked ? getDateFormat(new Date()) : null;
|
||||||
query.HasPremiereDate = this.checked ? true : null;
|
|
||||||
|
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#chkFutureEpisode', this).on('change', function () {
|
$('#chkFutureEpisode', this).on('change', function () {
|
||||||
|
|
||||||
query.LocationTypes = this.checked ? "virtual" : null;
|
var missingChecked = $('#chkMissingEpisode', page).checked();
|
||||||
|
|
||||||
|
query.LocationTypes = this.checked || missingChecked ? "virtual" : null;
|
||||||
|
query.HasPremiereDate = this.checked || missingChecked ? true : null;
|
||||||
query.MinPremiereDate = this.checked ? getDateFormat(new Date()) : null;
|
query.MinPremiereDate = this.checked ? getDateFormat(new Date()) : null;
|
||||||
query.HasPremiereDate = this.checked ? true : null;
|
|
||||||
|
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
loadSavedQueryValues: function (key, query) {
|
loadSavedQueryValues: function (key, query) {
|
||||||
|
|
||||||
var values = localStorage.getItem(key + '_' + Dashboard.getCurrentUserId());
|
var values = localStorage.getItem(key + '_' + Dashboard.getCurrentUserId());
|
||||||
|
|
||||||
if (values) {
|
if (values) {
|
||||||
|
|
||||||
values = JSON.parse(values);
|
values = JSON.parse(values);
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
if (item.LocationType == "Offline") {
|
if (item.LocationType == "Offline" || item.LocationType == "Virtual") {
|
||||||
html += LibraryBrowser.getOfflineIndicatorHtml(item);
|
html += LibraryBrowser.getOfflineIndicatorHtml(item);
|
||||||
} else {
|
} else {
|
||||||
html += LibraryBrowser.getNewIndicatorHtml(item);
|
html += LibraryBrowser.getNewIndicatorHtml(item);
|
||||||
|
@ -793,7 +793,7 @@
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.LocationType == "Offline") {
|
if (item.LocationType == "Offline" || item.LocationType == "Virtual") {
|
||||||
html += LibraryBrowser.getOfflineIndicatorHtml(item);
|
html += LibraryBrowser.getOfflineIndicatorHtml(item);
|
||||||
} else if (options.showNewIndicator !== false) {
|
} else if (options.showNewIndicator !== false) {
|
||||||
html += LibraryBrowser.getNewIndicatorHtml(item);
|
html += LibraryBrowser.getNewIndicatorHtml(item);
|
||||||
|
@ -836,16 +836,28 @@
|
||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
|
|
||||||
getOfflineIndicatorHtml: function () {
|
getOfflineIndicatorHtml: function (item) {
|
||||||
|
|
||||||
return '<div class="posterRibbon offlinePosterRibbon">Offline</div>';
|
if (item.LocationType == "Offline") {
|
||||||
|
return '<div class="posterRibbon offlinePosterRibbon">Offline</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (item.PremiereDate && (new Date().getTime() < parseISO8601Date(item.PremiereDate).getTime())) {
|
||||||
|
return '<div class="posterRibbon unairedPosterRibbon">Unaired</div>';
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return '<div class="posterRibbon missingPosterRibbon">Missing</div>';
|
||||||
},
|
},
|
||||||
getNewIndicatorHtml: function (item) {
|
getNewIndicatorHtml: function (item) {
|
||||||
|
|
||||||
if (item.LocationType == 'Virtual') {
|
if (item.LocationType == 'Virtual') {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Type == "Season") {
|
if (item.Type == "Season") {
|
||||||
if (item.RecursiveUnplayedItemCount) {
|
if (item.RecursiveUnplayedItemCount) {
|
||||||
return '<div class="posterRibbon">' + item.RecursiveUnplayedItemCount + ' New</div>';
|
return '<div class="posterRibbon">' + item.RecursiveUnplayedItemCount + ' New</div>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue