update shared components

This commit is contained in:
Luke Pulverenti 2016-08-01 01:09:09 -04:00
parent b760de915d
commit b14198727b
15 changed files with 51 additions and 39 deletions

View File

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.140",
"_release": "1.4.140",
"version": "1.4.141",
"_release": "1.4.141",
"_resolution": {
"type": "version",
"tag": "1.4.140",
"commit": "e772e866601556c902fd312a893653706a5ba13a"
"tag": "1.4.141",
"commit": "f04a3dea1a654d41eb586745e1276760025e0ec9"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.0",

View File

@ -179,6 +179,10 @@ button.cardContent {
background-clip: content-box !important;
}
.chapterCardImageContainer {
background-color: #000;
}
button.cardImageContainer {
border: 0;
padding: 0;

View File

@ -102,7 +102,6 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
}
var shapes = ['square', 'portrait', 'banner', 'smallBackdrop', 'backdrop', 'overflowBackdrop', 'overflowPortrait', 'overflowSquare'];
function getImageWidth(shape) {
var screenWidth = window.innerWidth;
@ -334,7 +333,6 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
var itemsInRow = 0;
var hasOpenRow = false;
var hasOpenSection = false;
html += renderItems.map(function (renderItem) {
@ -624,7 +622,8 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
function getDefaultColorIndex(str) {
if (str) {
var character = String(str.substr(str.length - 1).charCodeAt());
var charIndex = Math.floor(str.length / 2);
var character = String(str.substr(charIndex, 1).charCodeAt());
var sum = 0;
for (var i = 0; i < character.length; i++) {
sum += parseInt(character.charAt(i));
@ -1000,7 +999,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
var overlayButtons = '';
if (!layoutManager.tv) {
if (layoutManager.mobile) {
var overlayPlayButton = options.overlayPlayButton;

View File

@ -69,13 +69,17 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemShortcuts'], functi
var imgUrl = getImgUrl(item, chapter, index, options.width || 400, apiClient);
var cardImageContainerClass = 'cardImageContainer';
var cardImageContainerClass = 'cardImageContainer chapterCardImageContainer';
if (options.coverImage) {
cardImageContainerClass += ' coveredImage';
}
var dataAttributes = ' data-action="play" data-isfolder="' + item.IsFolder + '" data-id="' + item.Id + '" data-serverid="' + item.ServerId + '" data-type="' + item.Type + '" data-mediatype="' + item.MediaType + '" data-positionticks="' + chapter.StartPositionTicks + '"';
var cardImageContainer = imgUrl ? ('<div class="' + cardImageContainerClass + ' lazy" data-src="' + imgUrl + '">') : ('<div class="' + cardImageContainerClass + '">');
if (!imgUrl) {
cardImageContainer += '<i class="md-icon cardImageIcon">local_movies</i>';
}
var nameHtml = '';
nameHtml += '<div class="cardText">' + chapter.Name + '</div>';
nameHtml += '<div class="cardText">' + datetime.getDisplayRunningTime(chapter.StartPositionTicks) + '</div>';

View File

@ -61,6 +61,10 @@ define(['imageLoader', 'itemShortcuts', 'connectionManager'], function (imageLoa
}
var cardImageContainer = imgUrl ? ('<div class="' + cardImageContainerClass + ' lazy" data-src="' + imgUrl + '">') : ('<div class="' + cardImageContainerClass + '">');
if (!imgUrl) {
cardImageContainer += '<i class="md-icon cardImageIcon">person</i>';
}
var nameHtml = '';
nameHtml += '<div class="cardText">' + person.Name + '</div>';

View File

@ -163,8 +163,8 @@ define(['dom'], function (dom) {
var offset = getOffset(elem, windowData);
var posY = offset.top - windowData.pageXOffset;
var posX = offset.left - windowData.pageYOffset;
var posY = offset.top - windowData.pageYOffset;
var posX = offset.left - windowData.pageXOffset;
var width = elem.offsetWidth;
var height = elem.offsetHeight;

View File

@ -69,7 +69,7 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events', 'browser
} else {
imageFetcher.loadImage(elem, source);
}
elem.setAttribute("data-src", '');
elem.removeAttribute("data-src");
}
}

View File

@ -32,9 +32,9 @@
requestAnimationFrame(function () {
var keyframes = [
{ transform: 'translateY(0)', offset: 0 },
{ transform: 'none', offset: 0 },
{ transform: 'translateY(100%)', offset: 1 }];
var timing = { duration: 180, iterations: 1, fill: 'forwards', easing: 'ease-out' };
var timing = { duration: 140, iterations: 1, fill: 'forwards', easing: 'ease-out' };
elem.animate(keyframes, timing).onfinish = function () {
elem.classList.add('hide');
@ -58,8 +58,8 @@
var keyframes = [
{ transform: 'translateY(100%)', offset: 0 },
{ transform: 'translateY(0)', offset: 1 }];
var timing = { duration: 200, iterations: 1, fill: 'forwards', easing: 'ease-out' };
{ transform: 'none', offset: 1 }];
var timing = { duration: 180, iterations: 1, fill: 'forwards', easing: 'ease-out' };
elem.animate(keyframes, timing);
});
}
@ -218,7 +218,7 @@
showOverlayTimeout = setTimeout(function () {
onShowTimerExpired(card);
}, 1000);
}, 800);
}
function preventTouchHover() {

View File

@ -186,7 +186,7 @@
}
html += '<button type="button" class="' + cssClass + '">';
html += '<div class="cardBox">';
html += '<div class="cardBox visualCardBox">';
html += '<div class="cardScalable">';
html += '<div class="cardPadder"></div>';
@ -203,7 +203,7 @@
html += '</div>';
html += '</div>';
html += '<div class="cardFooter outerCardFooter">';
html += '<div class="cardFooter">';
html += '<div class="cardText cardTextCentered">' + result.Name + '</div>';
html += '<div class="cardText cardTextCentered">';

View File

@ -23,14 +23,6 @@ paper-input + .fieldDescription {
margin-bottom: 30px !important;
}
.ui-body-a .visualCardBox .cardScalable, .ui-body-a .visualCardBox .cardFooter {
background-color: #fff;
}
.ui-body-a .cardFooter .cardText + .cardText {
opacity: .8;
}
@media all and (min-width: 800px) {
.type-interior > .ui-content, .type-interior > .ui-panel-content-wrap > .ui-content {
@ -250,10 +242,6 @@ paper-textarea.mono textarea {
font-family: monospace !important;
}
.ui-body-a .paperCheckboxFieldDescription {
color: #333;
}
.ui-body-a paper-checkbox #checkbox.checked.paper-checkbox {
background-color: #52B54B;
border-color: #52B54B;

View File

@ -660,3 +660,12 @@ progress {
.ui-body-a .selectLabel, .ui-body-a .paperListLabel, .ui-body-a .fieldDescription {
color: #555;
}
.ui-body-a .visualCardBox .cardScalable, .ui-body-a .visualCardBox .cardFooter {
background-color: #fff;
}
.ui-body-a .cardFooter .cardText + .cardText {
opacity: .8;
}

View File

@ -32,7 +32,8 @@
</li>
<li>
<paper-checkbox id="chkSaveMetadataHidden">${OptionSaveMetadataAsHidden}</paper-checkbox>
<br /><br />
<div class="fieldDescription paperCheckboxFieldDescription">${OptionSaveMetadataAsHiddenHelp}</div>
<br />
</li>
</ul>

View File

@ -2857,12 +2857,14 @@ var AppInfo = {};
postInitDependencies.push('bower_components/emby-webcomponents/input/api');
if (navigator.serviceWorker && !AppInfo.isNativeApp) {
navigator.serviceWorker.register('serviceworker.js');
}
if (!browserInfo.tv && !AppInfo.isNativeApp) {
if (navigator.serviceWorker) {
navigator.serviceWorker.register('serviceworker.js');
}
if (window.Notification && !AppInfo.isNativeApp) {
postInitDependencies.push('bower_components/emby-webcomponents/notifications/notifications');
if (window.Notification || navigator.serviceWorker) {
postInitDependencies.push('bower_components/emby-webcomponents/notifications/notifications');
}
}
require(postInitDependencies);

View File

@ -43,6 +43,6 @@
</div>
</div>
<div is="emby-itemscontainer" class="searchResults hide itemsContainer"></div>
<div is="emby-itemscontainer" class="searchResults hide itemsContainer vertical-wrap paddedItemsContainer"></div>
</div>
</div>

View File

@ -2361,5 +2361,6 @@
"OptionUseMyCustomVersion": "Use a custom version",
"FFmpegSavePathNotFound": "We're unable to locate FFmpeg using the path you've entered. FFprobe is also required and must exist in the same folder. These components are normally bundled together in the same download. Please check the path and try again.",
"XmlTvPremiere": "By default, Emby will import {0} hours of guide data. Importing unlimited data requires an active Emby Premiere subscription.",
"MoreFromValue": "More from {0}"
"MoreFromValue": "More from {0}",
"OptionSaveMetadataAsHiddenHelp": "Changing this will apply to new metadata saved going forward. Existing metadata files will be updated the next time they are saved by Emby Server."
}