mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge remote-tracking branch 'upstream/master' into es6
With conflicts
This commit is contained in:
commit
3713091382
165 changed files with 4194 additions and 2714 deletions
|
@ -1,3 +1,4 @@
|
|||
<<<<<<< HEAD
|
||||
/* eslint-disable indent */
|
||||
|
||||
/**
|
||||
|
@ -15,6 +16,10 @@ import datetime from 'datetime';
|
|||
import 'css!./listview';
|
||||
import 'emby-ratingbutton';
|
||||
import 'emby-playstatebutton';
|
||||
=======
|
||||
define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutManager', 'globalize', 'datetime', 'cardBuilder', 'css!./listview', 'emby-ratingbutton', 'emby-playstatebutton'], function (itemHelper, mediaInfo, indicators, connectionManager, layoutManager, globalize, datetime, cardBuilder) {
|
||||
'use strict';
|
||||
>>>>>>> upstream/master
|
||||
|
||||
function getIndex(item, options) {
|
||||
|
||||
|
@ -106,11 +111,8 @@ import 'emby-playstatebutton';
|
|||
itemId = item.ParentPrimaryImageItemId;
|
||||
}
|
||||
|
||||
let blurHashes = item.ImageBlurHashes || {};
|
||||
let blurhashstr = (blurHashes[options.type] || {})[options.tag];
|
||||
|
||||
if (itemId) {
|
||||
return { url: apiClient.getScaledImageUrl(itemId, options), blurhash: blurhashstr };
|
||||
return apiClient.getScaledImageUrl(itemId, options);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -126,24 +128,30 @@ import 'emby-playstatebutton';
|
|||
if (item.ChannelId && item.ChannelPrimaryImageTag) {
|
||||
options.tag = item.ChannelPrimaryImageTag;
|
||||
}
|
||||
let blurHashes = item.ImageBlurHashes || {};
|
||||
let blurhashstr = (blurHashes[options.type])[options.tag];
|
||||
|
||||
if (item.ChannelId) {
|
||||
return { url: apiClient.getScaledImageUrl(item.ChannelId, options), blurhash: blurhashstr };
|
||||
return apiClient.getScaledImageUrl(item.ChannelId, options);
|
||||
}
|
||||
}
|
||||
|
||||
function getTextLinesHtml(textlines, isLargeStyle) {
|
||||
<<<<<<< HEAD
|
||||
|
||||
let html = '';
|
||||
=======
|
||||
var html = '';
|
||||
>>>>>>> upstream/master
|
||||
|
||||
const largeTitleTagName = layoutManager.tv ? 'h2' : 'div';
|
||||
|
||||
<<<<<<< HEAD
|
||||
for (let i = 0, length = textlines.length; i < length; i++) {
|
||||
|
||||
const text = textlines[i];
|
||||
|
||||
=======
|
||||
for (const [i, text] of textlines.entries()) {
|
||||
>>>>>>> upstream/master
|
||||
if (!text) {
|
||||
continue;
|
||||
}
|
||||
|
@ -284,10 +292,8 @@ import 'emby-playstatebutton';
|
|||
}
|
||||
|
||||
if (options.image !== false) {
|
||||
let imgData = options.imageSource === 'channel' ? getChannelImageUrl(item, downloadWidth) : getImageUrl(item, downloadWidth);
|
||||
let imgUrl = imgData.url;
|
||||
let blurhash = imgData.blurhash;
|
||||
let imageClass = isLargeStyle ? 'listItemImage listItemImage-large' : 'listItemImage';
|
||||
var imgUrl = options.imageSource === 'channel' ? getChannelImageUrl(item, downloadWidth) : getImageUrl(item, downloadWidth);
|
||||
var imageClass = isLargeStyle ? 'listItemImage listItemImage-large' : 'listItemImage';
|
||||
|
||||
if (isLargeStyle && layoutManager.tv) {
|
||||
imageClass += ' listItemImage-large-tv';
|
||||
|
@ -299,6 +305,7 @@ import 'emby-playstatebutton';
|
|||
imageClass += ' itemAction';
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
const imageAction = playOnImageClick ? 'resume' : action;
|
||||
|
||||
let blurhashAttrib = '';
|
||||
|
@ -310,6 +317,14 @@ import 'emby-playstatebutton';
|
|||
html += `<div data-action="${imageAction}" class="${imageClass} lazy" data-src="${imgUrl}" ${blurhashAttrib} item-icon>`;
|
||||
} else {
|
||||
html += `<div class="${imageClass}">`;
|
||||
=======
|
||||
var imageAction = playOnImageClick ? 'link' : action;
|
||||
|
||||
if (imgUrl) {
|
||||
html += '<div data-action="' + imageAction + '" class="' + imageClass + ' lazy" data-src="' + imgUrl + '" item-icon>';
|
||||
} else {
|
||||
html += '<div class="' + imageClass + ' cardImageContainer ' + cardBuilder.getDefaultBackgroundClass(item.Name) + '">' + cardBuilder.getDefaultText(item, options);
|
||||
>>>>>>> upstream/master
|
||||
}
|
||||
|
||||
let indicatorsHtml = '';
|
||||
|
@ -449,8 +464,6 @@ import 'emby-playstatebutton';
|
|||
|
||||
html += `<div class="${cssClass}">`;
|
||||
|
||||
const moreIcon = 'more_vert';
|
||||
|
||||
html += getTextLinesHtml(textlines, isLargeStyle);
|
||||
|
||||
if (options.mediaInfo !== false) {
|
||||
|
@ -505,10 +518,13 @@ import 'emby-playstatebutton';
|
|||
html += '<button is="paper-icon-button-light" class="listItemButton itemAction" data-action="addtoplaylist"><span class="material-icons playlist_add"></span></button>';
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (options.moreButton !== false) {
|
||||
html += `<button is="paper-icon-button-light" class="listItemButton itemAction" data-action="menu"><span class="material-icons ${moreIcon}"></span></button>`;
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> upstream/master
|
||||
if (options.infoButton) {
|
||||
html += '<button is="paper-icon-button-light" class="listItemButton itemAction" data-action="link"><span class="material-icons info_outline"></span></button>';
|
||||
}
|
||||
|
@ -522,13 +538,26 @@ import 'emby-playstatebutton';
|
|||
const userData = item.UserData || {};
|
||||
const likes = userData.Likes == null ? '' : userData.Likes;
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (itemHelper.canMarkPlayed(item)) {
|
||||
html += `<button is="emby-playstatebutton" type="button" class="listItemButton paper-icon-button-light" data-id="${item.Id}" data-serverid="${item.ServerId}" data-itemtype="${item.Type}" data-played="${userData.Played}"><span class="material-icons check"></span></button>`;
|
||||
}
|
||||
|
||||
if (itemHelper.canRate(item)) {
|
||||
html += `<button is="emby-ratingbutton" type="button" class="listItemButton paper-icon-button-light" data-id="${item.Id}" data-serverid="${item.ServerId}" data-itemtype="${item.Type}" data-likes="${likes}" data-isfavorite="${userData.IsFavorite}"><span class="material-icons favorite"></span></button>`;
|
||||
=======
|
||||
if (itemHelper.canMarkPlayed(item) && options.enablePlayedButton !== false) {
|
||||
html += '<button is="emby-playstatebutton" type="button" class="listItemButton paper-icon-button-light" data-id="' + item.Id + '" data-serverid="' + item.ServerId + '" data-itemtype="' + item.Type + '" data-played="' + (userData.Played) + '"><span class="material-icons check"></span></button>';
|
||||
}
|
||||
|
||||
if (itemHelper.canRate(item) && options.enableRatingButton !== false) {
|
||||
html += '<button is="emby-ratingbutton" type="button" class="listItemButton paper-icon-button-light" data-id="' + item.Id + '" data-serverid="' + item.ServerId + '" data-itemtype="' + item.Type + '" data-likes="' + likes + '" data-isfavorite="' + (userData.IsFavorite) + '"><span class="material-icons favorite"></span></button>';
|
||||
>>>>>>> upstream/master
|
||||
}
|
||||
}
|
||||
|
||||
if (options.moreButton !== false) {
|
||||
html += '<button is="paper-icon-button-light" class="listItemButton itemAction" data-action="menu"><span class="material-icons more_vert"></span></button>';
|
||||
}
|
||||
}
|
||||
html += '</div>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue