1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update latest items

This commit is contained in:
Luke Pulverenti 2016-11-05 15:34:03 -04:00
parent 30ad844e37
commit 3c571f5ded
8 changed files with 40 additions and 49 deletions

View file

@ -22,7 +22,7 @@
html += '<button type="button" is="paper-icon-button-light" class="headerButton mainDrawerButton barsMenuButton headerButtonLeft hide"><i class="md-icon">menu</i></button>';
html += '<button type="button" is="paper-icon-button-light" class="headerButton headerAppsButton barsMenuButton headerButtonLeft"><i class="md-icon">home</i></button>';
html += '<div class="libraryMenuButtonText headerButton">' + Globalize.translate('ButtonHome') + '</div>';
html += '<h3 class="libraryMenuButtonText headerButton">' + Globalize.translate('ButtonHome') + '</h3>';
html += '<div class="viewMenuSecondary">';

View file

@ -1,4 +1,4 @@
define(['components/categorysyncbuttons', 'components/groupedcards', 'cardBuilder'], function (categorysyncbuttons, groupedcards, cardBuilder) {
define(['components/categorysyncbuttons', 'components/groupedcards', 'cardBuilder', 'apphost'], function (categorysyncbuttons, groupedcards, cardBuilder, appHost) {
'use strict';
function getView() {
@ -31,40 +31,27 @@
promise.then(function (items) {
var view = getView();
var html = '';
if (view == 'ThumbCard') {
var supportsImageAnalysis = appHost.supports('imageanalysis');
html += cardBuilder.getCardsHtml({
items: items,
shape: "backdrop",
preferThumb: true,
inheritThumb: false,
showUnplayedIndicator: false,
showChildCountIndicator: true,
showParentTitle: true,
lazy: true,
showTitle: true,
cardLayout: true
});
} else if (view == 'Thumb') {
html += cardBuilder.getCardsHtml({
items: items,
shape: "backdrop",
preferThumb: true,
inheritThumb: false,
showParentTitle: false,
showUnplayedIndicator: false,
showChildCountIndicator: true,
centerText: true,
lazy: true,
showTitle: false,
overlayPlayButton: true
});
}
html += cardBuilder.getCardsHtml({
items: items,
shape: "backdrop",
preferThumb: true,
showTitle: true,
showSeriesYear: true,
showParentTitle: true,
overlayText: false,
cardLayout: true,
showUnplayedIndicator: false,
showChildCountIndicator: true,
centerText: false,
lazy: true,
overlayPlayButton: true,
vibrant: supportsImageAnalysis,
lines: 2
});
var elem = context.querySelector('#latestEpisodes');
elem.innerHTML = html;