mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' into hadicharara/added-support-for-rtl-layouts
This commit is contained in:
commit
104ad71ea7
128 changed files with 1242 additions and 1454 deletions
|
@ -390,7 +390,8 @@ import { appRouter } from '../appRouter';
|
|||
} else if (options.indexBy === 'ProductionYear') {
|
||||
newIndexValue = item.ProductionYear;
|
||||
} else if (options.indexBy === 'CommunityRating') {
|
||||
newIndexValue = item.CommunityRating ? (Math.floor(item.CommunityRating) + (item.CommunityRating % 1 >= 0.5 ? 0.5 : 0)) + '+' : null;
|
||||
const roundedRatingDecimal = item.CommunityRating % 1 >= 0.5 ? 0.5 : 0;
|
||||
newIndexValue = item.CommunityRating ? (Math.floor(item.CommunityRating) + roundedRatingDecimal) + '+' : null;
|
||||
}
|
||||
|
||||
if (newIndexValue !== currentIndexValue) {
|
||||
|
@ -512,6 +513,7 @@ import { appRouter } from '../appRouter';
|
|||
let imgType = null;
|
||||
let itemId = null;
|
||||
|
||||
/* eslint-disable sonarjs/no-duplicated-branches */
|
||||
if (options.preferThumb && item.ImageTags && item.ImageTags.Thumb) {
|
||||
imgType = 'Thumb';
|
||||
imgTag = item.ImageTags.Thumb;
|
||||
|
@ -608,6 +610,7 @@ import { appRouter } from '../appRouter';
|
|||
imgTag = item.ParentBackdropImageTags[0];
|
||||
itemId = item.ParentBackdropItemId;
|
||||
}
|
||||
/* eslint-enable sonarjs/no-duplicated-branches */
|
||||
|
||||
if (!itemId) {
|
||||
itemId = item.Id;
|
||||
|
@ -790,10 +793,8 @@ import { appRouter } from '../appRouter';
|
|||
|
||||
const showOtherText = isOuterFooter ? !overlayText : overlayText;
|
||||
|
||||
if (isOuterFooter && options.cardLayout && layoutManager.mobile) {
|
||||
if (options.cardFooterAside !== 'none') {
|
||||
html += `<button is="paper-icon-button-light" class="itemAction btnCardOptions cardText-secondary" data-action="menu" title="${globalize.translate('ButtonMore')}"><span class="material-icons more_vert" aria-hidden="true"></span></button>`;
|
||||
}
|
||||
if (isOuterFooter && options.cardLayout && layoutManager.mobile && options.cardFooterAside !== 'none') {
|
||||
html += `<button is="paper-icon-button-light" class="itemAction btnCardOptions cardText-secondary" data-action="menu" title="${globalize.translate('ButtonMore')}"><span class="material-icons more_vert" aria-hidden="true"></span></button>`;
|
||||
}
|
||||
|
||||
const cssClass = options.centerText ? 'cardText cardTextCentered' : 'cardText';
|
||||
|
@ -803,33 +804,31 @@ import { appRouter } from '../appRouter';
|
|||
const parentTitleUnderneath = item.Type === 'MusicAlbum' || item.Type === 'Audio' || item.Type === 'MusicVideo';
|
||||
let titleAdded;
|
||||
|
||||
if (showOtherText) {
|
||||
if ((options.showParentTitle || options.showParentTitleOrTitle) && !parentTitleUnderneath) {
|
||||
if (isOuterFooter && item.Type === 'Episode' && item.SeriesName) {
|
||||
if (item.SeriesId) {
|
||||
lines.push(getTextActionButton({
|
||||
Id: item.SeriesId,
|
||||
ServerId: serverId,
|
||||
Name: item.SeriesName,
|
||||
Type: 'Series',
|
||||
IsFolder: true
|
||||
}));
|
||||
} else {
|
||||
lines.push(escapeHtml(item.SeriesName));
|
||||
if (showOtherText && (options.showParentTitle || options.showParentTitleOrTitle) && !parentTitleUnderneath) {
|
||||
if (isOuterFooter && item.Type === 'Episode' && item.SeriesName) {
|
||||
if (item.SeriesId) {
|
||||
lines.push(getTextActionButton({
|
||||
Id: item.SeriesId,
|
||||
ServerId: serverId,
|
||||
Name: item.SeriesName,
|
||||
Type: 'Series',
|
||||
IsFolder: true
|
||||
}));
|
||||
} else {
|
||||
lines.push(escapeHtml(item.SeriesName));
|
||||
}
|
||||
} else {
|
||||
if (isUsingLiveTvNaming(item)) {
|
||||
lines.push(escapeHtml(item.Name));
|
||||
|
||||
if (!item.EpisodeTitle && !item.IndexNumber) {
|
||||
titleAdded = true;
|
||||
}
|
||||
} else {
|
||||
if (isUsingLiveTvNaming(item)) {
|
||||
lines.push(escapeHtml(item.Name));
|
||||
const parentTitle = item.SeriesName || item.Series || item.Album || item.AlbumArtist || '';
|
||||
|
||||
if (!item.EpisodeTitle && !item.IndexNumber) {
|
||||
titleAdded = true;
|
||||
}
|
||||
} else {
|
||||
const parentTitle = item.SeriesName || item.Series || item.Album || item.AlbumArtist || '';
|
||||
|
||||
if (parentTitle || showTitle) {
|
||||
lines.push(escapeHtml(parentTitle));
|
||||
}
|
||||
if (parentTitle || showTitle) {
|
||||
lines.push(escapeHtml(parentTitle));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -987,10 +986,8 @@ import { appRouter } from '../appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
if (options.showPersonRoleOrType) {
|
||||
if (item.Role) {
|
||||
lines.push(globalize.translate('PersonRole', escapeHtml(item.Role)));
|
||||
}
|
||||
if (options.showPersonRoleOrType && item.Role) {
|
||||
lines.push(globalize.translate('PersonRole', escapeHtml(item.Role)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1010,13 +1007,11 @@ import { appRouter } from '../appRouter';
|
|||
html += progressHtml;
|
||||
}
|
||||
|
||||
if (html) {
|
||||
if (!isOuterFooter || logoUrl || options.cardLayout) {
|
||||
html = '<div class="' + footerClass + '">' + html;
|
||||
if (html && (!isOuterFooter || logoUrl || options.cardLayout)) {
|
||||
html = '<div class="' + footerClass + '">' + html;
|
||||
|
||||
//cardFooter
|
||||
html += '</div>';
|
||||
}
|
||||
//cardFooter
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
return html;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue