mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update display of active recordings
This commit is contained in:
parent
f11a08df43
commit
8bf645c346
24 changed files with 224 additions and 185 deletions
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.294",
|
||||
"_release": "1.4.294",
|
||||
"version": "1.4.295",
|
||||
"_release": "1.4.295",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.294",
|
||||
"commit": "261889a750a63f93e456622c6882d18bb9248626"
|
||||
"tag": "1.4.295",
|
||||
"commit": "1cfe41bab16e66d13ef8a613b251ee3edccde3a8"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -348,15 +348,21 @@ button {
|
|||
|
||||
.cardOverlayButton {
|
||||
color: #fff !important;
|
||||
background-color: rgba(0,0,0,.7) !important;
|
||||
background-color: rgba(0,0,0,.8) !important;
|
||||
border-radius: 500px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: 0 .35em .5em 0;
|
||||
z-index: 1;
|
||||
/*opacity: 0;
|
||||
transition: opacity 0.5s ease-in; /* vendorless fallback */ */;
|
||||
}
|
||||
|
||||
/*.card:hover .cardOverlayButton {
|
||||
opacity: 1;
|
||||
}*/
|
||||
|
||||
.cardOverlayButton:hover {
|
||||
background-color: rgba(0,0,0,.9) !important;
|
||||
transition: background-color .5s ease-out;
|
||||
|
@ -625,10 +631,6 @@ button {
|
|||
width: 16.66666666666666667%;
|
||||
}
|
||||
|
||||
.layout-tv .personCard-scalable {
|
||||
width: 14.285714285714285714285714285714%;
|
||||
}
|
||||
|
||||
|
||||
@media all and (min-width: 1600px) {
|
||||
|
||||
|
|
|
@ -286,6 +286,10 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
className += ' ' + options.shape + 'Card';
|
||||
}
|
||||
|
||||
if (options.cardCssClass) {
|
||||
className += ' ' + options.cardCssClass;
|
||||
}
|
||||
|
||||
var html = '';
|
||||
var itemsInRow = 0;
|
||||
|
||||
|
@ -543,7 +547,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
tag: item.SeriesThumbImageTag
|
||||
});
|
||||
|
||||
} else if (options.preferThumb && item.ParentThumbItemId && options.inheritThumb !== false) {
|
||||
} else if (options.preferThumb && item.ParentThumbItemId && options.inheritThumb !== false && item.MediaType !== 'Photo') {
|
||||
|
||||
imgUrl = apiClient.getScaledImageUrl(item.ParentThumbItemId, {
|
||||
type: "Thumb",
|
||||
|
@ -707,7 +711,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
return 'defaultCardColor' + getDefaultColorIndex(str);
|
||||
}
|
||||
|
||||
function getCardTextLines(lines, cssClass, forceLines, isOuterFooter, cardLayout) {
|
||||
function getCardTextLines(lines, cssClass, forceLines, isOuterFooter, cardLayout, addRightMargin) {
|
||||
|
||||
var html = '';
|
||||
|
||||
|
@ -723,7 +727,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
currentCssClass += ' cardText-secondary';
|
||||
}
|
||||
|
||||
if (isOuterFooter && cardLayout) {
|
||||
if (addRightMargin) {
|
||||
currentCssClass += ' cardText-rightmargin';
|
||||
}
|
||||
|
||||
|
@ -754,16 +758,13 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
|
||||
if (isOuterFooter && options.cardLayout && !layoutManager.tv) {
|
||||
|
||||
if (options.cardFooterAside === 'logo') {
|
||||
|
||||
}
|
||||
else if (options.cardFooterAside !== 'none') {
|
||||
if (options.cardFooterAside !== 'none') {
|
||||
var moreIcon = appHost.moreIcon === 'dots-horiz' ? '' : '';
|
||||
html += '<button is="paper-icon-button-light" class="itemAction btnCardOptions autoSize" data-action="menu"><i class="md-icon">' + moreIcon + '</i></button>';
|
||||
}
|
||||
}
|
||||
|
||||
var cssClass = options.centerText && !options.cardLayout ? "cardText cardTextCentered" : "cardText";
|
||||
var cssClass = options.centerText ? "cardText cardTextCentered" : "cardText";
|
||||
|
||||
var lines = [];
|
||||
var parentTitleUnderneath = item.Type === 'MusicAlbum' || item.Type === 'Audio' || item.Type === 'MusicVideo';
|
||||
|
@ -980,13 +981,24 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
lines.push(item.ChannelName || '');
|
||||
}
|
||||
}
|
||||
|
||||
if (options.showPersonRoleOrType) {
|
||||
if (item.Role) {
|
||||
lines.push('as ' + item.Role);
|
||||
}
|
||||
else if (item.Type) {
|
||||
lines.push(globalize.translate('core#' + item.Type));
|
||||
} else {
|
||||
lines.push('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((showTitle || !imgUrl) && forceName && overlayText && lines.length === 1) {
|
||||
lines = [];
|
||||
}
|
||||
|
||||
html += getCardTextLines(lines, cssClass, !options.overlayText, isOuterFooter, options.cardLayout);
|
||||
html += getCardTextLines(lines, cssClass, !options.overlayText, isOuterFooter, options.cardLayout, isOuterFooter && options.cardLayout && !options.centerText);
|
||||
|
||||
if (progressHtml) {
|
||||
html += progressHtml;
|
||||
|
@ -1166,7 +1178,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
if (coveredImage) {
|
||||
cardImageContainerClass += ' coveredImage';
|
||||
|
||||
if (item.MediaType === 'Photo' || item.Type === 'PhotoAlbum' || item.Type === 'Folder' || item.ProgramInfo || item.Type === 'Program') {
|
||||
if (item.MediaType === 'Photo' || item.Type === 'PhotoAlbum' || item.Type === 'Folder' || item.ProgramInfo || item.Type === 'Program' || item.Type === 'Recording') {
|
||||
cardImageContainerClass += ' coveredImage-noScale';
|
||||
}
|
||||
}
|
||||
|
@ -1364,7 +1376,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
var channelIdData = item.ChannelId ? (' data-channelid="' + item.ChannelId + '"') : '';
|
||||
var contextData = options.context ? (' data-context="' + options.context + '"') : '';
|
||||
|
||||
return '<' + tagName + ' data-index="' + index + '"' + timerAttributes + actionAttribute + ' data-isfolder="' + (item.IsFolder || false) + '" data-serverid="' + (item.ServerId) + '" data-id="' + (item.Id || item.ItemId) + '" data-type="' + item.Type + '"' + mediaTypeData + collectionTypeData + channelIdData + positionTicksData + collectionIdData + playlistIdData + contextData + ' data-prefix="' + prefix + '" class="' + className + '">' + cardImageContainerOpen + innerCardFooter + cardImageContainerClose + cardContentClose + overlayButtons + cardScalableClose + outerCardFooter + cardBoxClose + '</' + tagName + '>';
|
||||
return '<' + tagName + ' data-index="' + index + '"' + timerAttributes + actionAttribute + ' data-isfolder="' + (item.IsFolder || false) + '" data-serverid="' + (item.ServerId || options.serverId) + '" data-id="' + (item.Id || item.ItemId) + '" data-type="' + item.Type + '"' + mediaTypeData + collectionTypeData + channelIdData + positionTicksData + collectionIdData + playlistIdData + contextData + ' data-prefix="' + prefix + '" class="' + className + '">' + cardImageContainerOpen + innerCardFooter + cardImageContainerClose + cardContentClose + overlayButtons + cardScalableClose + outerCardFooter + cardBoxClose + '</' + tagName + '>';
|
||||
}
|
||||
|
||||
function buildCards(items, options) {
|
||||
|
|
|
@ -1,119 +1,17 @@
|
|||
define(['imageLoader', 'itemShortcuts', 'connectionManager', 'layoutManager'], function (imageLoader, itemShortcuts, connectionManager, layoutManager) {
|
||||
define(['cardBuilder'], function (cardBuilder) {
|
||||
'use strict';
|
||||
|
||||
function buildPeopleCardsHtml(people, options) {
|
||||
|
||||
var className = 'card ' + (options.shape || 'portrait') + 'Card personCard';
|
||||
|
||||
if (options.block || options.rows) {
|
||||
className += ' block';
|
||||
}
|
||||
|
||||
var html = '';
|
||||
var itemsInRow = 0;
|
||||
|
||||
var serverId = options.serverId;
|
||||
var apiClient = connectionManager.getApiClient(serverId);
|
||||
|
||||
for (var i = 0, length = people.length; i < length; i++) {
|
||||
|
||||
if (options.rows && itemsInRow === 0) {
|
||||
html += '<div class="cardColumn">';
|
||||
}
|
||||
|
||||
var person = people[i];
|
||||
|
||||
html += buildPersonCard(person, apiClient, serverId, options, className);
|
||||
itemsInRow++;
|
||||
|
||||
if (options.rows && itemsInRow >= options.rows) {
|
||||
itemsInRow = 0;
|
||||
html += '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function getImgUrl(person, maxWidth, apiClient) {
|
||||
|
||||
if (person.PrimaryImageTag) {
|
||||
|
||||
return apiClient.getScaledImageUrl(person.Id, {
|
||||
|
||||
maxWidth: maxWidth,
|
||||
tag: person.PrimaryImageTag,
|
||||
type: "Primary"
|
||||
});
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function buildPersonCard(person, apiClient, serverId, options, className) {
|
||||
|
||||
className += " itemAction scalableCard personCard-scalable";
|
||||
className += " " + (options.shape || 'portrait') + 'Card-scalable';
|
||||
|
||||
var imgUrl = getImgUrl(person, options.width, apiClient);
|
||||
|
||||
var cardImageContainerClass = 'cardImageContainer';
|
||||
if (options.coverImage) {
|
||||
cardImageContainerClass += ' coveredImage';
|
||||
}
|
||||
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 cardTextCentered">' + person.Name + '</div>';
|
||||
|
||||
if (person.Role) {
|
||||
nameHtml += '<div class="cardText cardText-secondary cardTextCentered">as ' + person.Role + '</div>';
|
||||
}
|
||||
else if (person.Type) {
|
||||
nameHtml += '<div class="cardText cardText-secondary cardTextCentered">' + Globalize.translate('core#' + person.Type) + '</div>';
|
||||
} else {
|
||||
nameHtml += '<div class="cardText cardText-secondary cardTextCentered"> </div>';
|
||||
}
|
||||
|
||||
var cardBoxCssClass = 'visualCardBox cardBox';
|
||||
|
||||
if (layoutManager.tv) {
|
||||
cardBoxCssClass += ' cardBox-focustransform';
|
||||
}
|
||||
|
||||
var html = '<button type="button" data-isfolder="' + person.IsFolder + '" data-type="' + person.Type + '" data-action="link" data-id="' + person.Id + '" data-serverid="' + serverId + '" raised class="' + className + '"><div class="' + cardBoxCssClass + '"><div class="cardScalable visualCardBox-cardScalable"><div class="cardPadder-portrait"></div><div class="cardContent">' + cardImageContainer + '</div></div></div><div class="cardFooter visualCardBox-cardFooter">' + nameHtml + '</div></div></button>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function buildPeopleCards(items, options) {
|
||||
|
||||
if (options.parentContainer) {
|
||||
// Abort if the container has been disposed
|
||||
if (!document.body.contains(options.parentContainer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (items.length) {
|
||||
options.parentContainer.classList.remove('hide');
|
||||
} else {
|
||||
options.parentContainer.classList.add('hide');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var html = buildPeopleCardsHtml(items, options);
|
||||
|
||||
options.itemsContainer.innerHTML = html;
|
||||
|
||||
imageLoader.lazyChildren(options.itemsContainer);
|
||||
|
||||
itemShortcuts.off(options.itemsContainer);
|
||||
itemShortcuts.on(options.itemsContainer);
|
||||
options = Object.assign(options || {}, {
|
||||
cardLayout: true,
|
||||
centerText: true,
|
||||
showTitle: true,
|
||||
cardFooterAside: 'none',
|
||||
showPersonRoleOrType: true,
|
||||
cardCssClass: 'personCard'
|
||||
});
|
||||
cardBuilder.buildCards(items, options);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -353,9 +353,9 @@
|
|||
if (item.Type == 'SeriesTimer') {
|
||||
return '<i class="md-icon programIcon seriesTimerIcon"></i>';
|
||||
}
|
||||
else if (item.TimerId) {
|
||||
else if (item.TimerId || item.SeriesTimerId) {
|
||||
|
||||
status = item.Status;
|
||||
status = item.Status || 'Cancelled';
|
||||
}
|
||||
else if (item.Type == 'Timer') {
|
||||
|
||||
|
|
|
@ -103,9 +103,9 @@ define(['css!./indicators.css', 'material-icons'], function () {
|
|||
if (item.Type == 'SeriesTimer') {
|
||||
return '<i class="md-icon timerIndicator indicatorIcon"></i>';
|
||||
}
|
||||
else if (item.TimerId) {
|
||||
else if (item.TimerId || item.SeriesTimerId) {
|
||||
|
||||
status = item.Status;
|
||||
status = item.Status || 'Cancelled';
|
||||
}
|
||||
else if (item.Type == 'Timer') {
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', '
|
|||
if (item.Type == 'SeriesTimer') {
|
||||
return '<i class="md-icon mediaInfoItem mediaInfoIconItem mediaInfoTimerIcon"></i>';
|
||||
}
|
||||
else if (item.TimerId) {
|
||||
else if (item.TimerId || item.SeriesTimerId) {
|
||||
|
||||
status = item.Status;
|
||||
status = item.Status || 'Cancelled';
|
||||
}
|
||||
else if (item.Type == 'Timer') {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.49",
|
||||
"version": "0.5.50",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
@ -16,11 +16,11 @@
|
|||
"test",
|
||||
"tests"
|
||||
],
|
||||
"_release": "0.5.49",
|
||||
"_release": "0.5.50",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.5.49",
|
||||
"commit": "faf1c90b096abf152cce4ba107fbd5511d44a998"
|
||||
"tag": "v0.5.50",
|
||||
"commit": "854f98fa81601076a44e4849a45cbd65dcc0c3ee"
|
||||
},
|
||||
"_source": "git://github.com/dailymotion/hls.js.git",
|
||||
"_target": "~0.5.7",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.49",
|
||||
"version": "0.5.50",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.49",
|
||||
"version": "0.5.50",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue