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

update components

This commit is contained in:
Luke Pulverenti 2016-05-30 12:09:47 -04:00
parent e6d3222572
commit 0afeb5bdd4
8 changed files with 206 additions and 11 deletions

View file

@ -15,12 +15,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.3.99",
"_release": "1.3.99",
"version": "1.4.2",
"_release": "1.4.2",
"_resolution": {
"type": "version",
"tag": "1.3.99",
"commit": "7d4af256dfc6ba03b587ae34ed567557c441f2c1"
"tag": "1.4.2",
"commit": "53a28dd7296648adfda6f62cf45012567b670186"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.0",

View file

@ -12,4 +12,5 @@
left: 0;
right: 0;
bottom: 0;
contain: layout style;
}

View file

@ -38,7 +38,7 @@
transform: scale(1.4,1.4) translateY(80%);
}
.inputLabelFocused:not(.blank) {
.inputLabel.focused:not(.blank) {
color: #52B54B;
}

View file

@ -39,10 +39,10 @@
this.addEventListener('focus', function () {
onChange.call(this);
label.classList.add('inputLabelFocused');
label.classList.add('focused');
});
this.addEventListener('blur', function () {
label.classList.remove('inputLabelFocused');
label.classList.remove('focused');
});
this.addEventListener('change', onChange);

View file

@ -32,7 +32,7 @@ define([], function () {
}
}
var focusableTagNames = ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON', 'A', 'PAPER-BUTTON', 'PAPER-INPUT', 'PAPER-TEXTAREA', 'PAPER-FAB', 'PAPER-CHECKBOX', 'PAPER-ICON-ITEM', 'PAPER-MENU-ITEM', 'EMBY-DROPDOWN-MENU'];
var focusableTagNames = ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON', 'A', 'PAPER-BUTTON', 'PAPER-INPUT', 'PAPER-CHECKBOX', 'EMBY-DROPDOWN-MENU'];
var focusableContainerTagNames = ['BODY', 'DIALOG'];
var focusableQuery = focusableTagNames.join(',') + ',.focusable';

View file

@ -0,0 +1,52 @@
.listItem {
display: flex;
align-items: center;
text-align: left;
padding: .1em .55em !important;
outline: none !important;
}
.listItem.largeImage {
padding: 1em 0 1em 1em;
}
.listItemBody {
flex-grow: 1;
padding: .35em .55em;
}
.listItemImage {
width: 7.4vh;
height: 7.4vh;
background-repeat: no-repeat;
background-size: contain;
flex-shrink: 0;
}
.listItem.largeImage .listItemImage {
width: 45vh;
height: 30vh;
background-position: center center;
position: relative;
margin-right: 2%;
margin-left: 1%;
}
.listItemImage .itemProgressBar {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.listItem:focus .secondary {
color: inherit !important;
}
.listItem {
transition: transform .2s ease-out;
}
.listItem:focus {
transform: scale(1.025, 1.025);
}

View file

@ -0,0 +1,142 @@
define(['itemHelper', 'mediaInfo', 'indicators', 'clearButtonStyle', 'css!./listview'], function (itemHelper, mediaInfo, indicators) {
function getListViewHtml(items, options) {
var outerHtml = "";
var index = 0;
var groupTitle = '';
var action = options.action || 'link';
var isLargeStyle = options.imageSize == 'large';
var enableOverview = options.enableOverview;
outerHtml += items.map(function (item) {
var html = '';
var cssClass = "itemAction clearButton listItem";
var downloadWidth = 80;
if (isLargeStyle) {
cssClass += " largeImage";
downloadWidth = 500;
}
html += '<button class="' + cssClass + '" data-index="' + index + '" data-action="' + action + '" data-isfolder="' + item.IsFolder + '" data-id="' + item.Id + '" data-serverid="' + item.ServerId + '" data-type="' + item.Type + '">';
var imgUrl = Emby.Models.imageUrl(item, {
width: downloadWidth,
type: "Primary"
});
if (!imgUrl) {
imgUrl = Emby.Models.thumbImageUrl(item, {
width: downloadWidth,
type: "Thumb"
});
}
if (imgUrl) {
html += '<div class="listItemImage lazy" data-src="' + imgUrl + '" item-icon>';
} else {
html += '<div class="listItemImage" item-icon>';
}
var indicatorsHtml = '';
indicatorsHtml += indicators.getPlayedIndicatorHtml(item);
if (indicatorsHtml) {
html += '<div class="indicators">' + indicatorsHtml + '</div>';
}
var progressHtml = indicators.getProgressBarHtml(item);
if (progressHtml) {
html += progressHtml;
}
html += '</div>';
var textlines = [];
if (options.showParentTitle) {
if (item.Type == 'Episode') {
textlines.push(item.SeriesName || '&nbsp;');
} else if (item.Type == 'MusicAlbum') {
textlines.push(item.AlbumArtist || '&nbsp;');
}
}
var displayName = itemHelper.getDisplayName(item);
if (options.showIndexNumber && item.IndexNumber != null) {
displayName = item.IndexNumber + ". " + displayName;
}
textlines.push(displayName);
if (item.Type == 'Audio') {
textlines.push(item.ArtistItems.map(function (a) {
return a.Name;
}).join(', ') || '&nbsp;');
}
var lineCount = textlines.length;
if (!options.enableSideMediaInfo) {
lineCount++;
}
if (enableOverview && item.Overview) {
lineCount++;
}
html += '<div class="listItemBody">';
for (var i = 0, textLinesLength = textlines.length; i < textLinesLength; i++) {
if (i == 0 && isLargeStyle) {
html += '<h2 class="listItemTitle">';
}
else if (i == 0) {
html += '<div>';
} else {
html += '<div class="secondary">';
}
html += textlines[i] || '&nbsp;';
if (i == 0 && isLargeStyle) {
html += '</h2>';
} else {
html += '</div>';
}
}
if (!options.enableSideMediaInfo) {
html += '<div class="secondary listItemMediaInfo">' + mediaInfo.getPrimaryMediaInfoHtml(item) + '</div>';
}
if (enableOverview && item.Overview) {
html += '<div class="secondary overview">';
html += item.Overview;
html += '</div>';
}
html += '</div>';
if (options.enableSideMediaInfo) {
html += '<div class="secondary listItemMediaInfo">' + mediaInfo.getPrimaryMediaInfoHtml(item) + '</div>';
}
html += '</button>';
index++;
return html;
}).join('');
return outerHtml;
}
return {
getListViewHtml: getListViewHtml
};
});

View file

@ -36,7 +36,7 @@
"tag": "v1.5.2",
"commit": "18e8e12dcd9a4560de480562f65935feed334b86"
},
"_source": "git://github.com/polymerelements/iron-selector.git",
"_source": "git://github.com/PolymerElements/iron-selector.git",
"_target": "^1.0.0",
"_originalSource": "polymerelements/iron-selector"
"_originalSource": "PolymerElements/iron-selector"
}