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

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.330",
"_release": "1.4.330",
"version": "1.4.331",
"_release": "1.4.331",
"_resolution": {
"type": "version",
"tag": "1.4.330",
"commit": "14b8b8dd7303142a641995e0cd31a0972786399f"
"tag": "1.4.331",
"commit": "922ebb6b3119283fbe0585ccc1b71b87f26bb8ee"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View File

@ -107,7 +107,7 @@ button {
.btnCardOptions {
position: absolute;
bottom: 0;
bottom: .25em;
right: 0;
margin: 0 !important;
z-index: 1;

View File

@ -689,7 +689,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
return 'defaultCardColor' + getDefaultColorIndex(str);
}
function getCardTextLines(lines, cssClass, forceLines, isOuterFooter, cardLayout, addRightMargin) {
function getCardTextLines(lines, cssClass, forceLines, isOuterFooter, cardLayout, addRightMargin, maxLines) {
var html = '';
@ -714,10 +714,17 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
html += text;
html += "</div>";
valid++;
if (maxLines && valid >= maxLines) {
break;
}
}
}
if (forceLines) {
length = Math.min(lines.length, maxLines || lines.length);
while (valid < length) {
html += "<div class='" + cssClass + "'>&nbsp;</div>";
valid++;
@ -985,7 +992,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
lines = [];
}
html += getCardTextLines(lines, cssClass, !options.overlayText, isOuterFooter, options.cardLayout, isOuterFooter && options.cardLayout && !options.centerText);
html += getCardTextLines(lines, cssClass, !options.overlayText, isOuterFooter, options.cardLayout, isOuterFooter && options.cardLayout && !options.centerText, options.lines);
if (progressHtml) {
html += progressHtml;

View File

@ -152,7 +152,7 @@
.paper-icon-button-light > i {
width: 1em;
height: 1em;
font-size: 1.7em;
font-size: 1.6em;
/* Make sure its on top of the ripple */
position: relative;
z-index: 1;

View File

@ -24,6 +24,8 @@ _:-ms-input-placeholder, :root .mdl-slider {
z-index: 1;
cursor: pointer;
margin: 0;
/* Disable webkit tap highlighting */
-webkit-tap-highlight-color: rgba(0,0,0,0);
/**************************** Tracks ****************************/
/**************************** Thumbs ****************************/
/**************************** 0-value ****************************/
@ -224,6 +226,7 @@ _:-ms-input-placeholder, :root .mdl-slider {
align-items: center;
justify-content: center;
}
.sliderBubbleText {
margin: 0;
}

View File

@ -73,25 +73,20 @@
.libraryMenuButtonText {
text-decoration: none;
font-weight: 400 !important;
display: inline-flex;
vertical-align: middle;
padding-left: 0 !important;
cursor: default;
position: relative;
top: 1px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
align-items: center;
margin-left: .75em;
font-size: 108%;
margin: 0 0 0 .5em;
/* Avoid pushing right header off the screen */
flex-shrink: 1;
}
.viewMenuBar {
font-weight: bold;
position: fixed;
right: 0;
left: 0;
@ -101,7 +96,6 @@
height: 50px;
display: flex;
flex-direction: column;
font-size: 13px;
}
.hiddenViewMenuBar .viewMenuBar {

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,
showSeriesYear: true,
showParentTitle: true,
overlayText: false,
cardLayout: true,
showUnplayedIndicator: false,
showChildCountIndicator: true,
centerText: true,
centerText: false,
lazy: true,
showTitle: false,
overlayPlayButton: true
overlayPlayButton: true,
vibrant: supportsImageAnalysis,
lines: 2
});
}
var elem = context.querySelector('#latestEpisodes');
elem.innerHTML = html;