mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' into connection-manager-global
This commit is contained in:
commit
3cbe0f7264
139 changed files with 1032 additions and 3566 deletions
|
@ -7,11 +7,11 @@
|
|||
<div class="detailPagePrimaryContainer padded-left padded-right">
|
||||
<div class="infoWrapper infoText">
|
||||
<div class="nameContainer"></div>
|
||||
<div class="itemMiscInfo itemMiscInfo-primary" style="margin-bottom: 0.6em"></div>
|
||||
<div class="itemMiscInfo itemMiscInfo-secondary" style="margin-bottom: 0.6em"></div>
|
||||
<div class="itemMiscInfo itemMiscInfo-primary" style="margin-bottom: 0.6em;"></div>
|
||||
<div class="itemMiscInfo itemMiscInfo-secondary" style="margin-bottom: 0.6em;"></div>
|
||||
</div>
|
||||
|
||||
<div class="mainDetailButtons">
|
||||
<div class="mainDetailButtons focuscontainer-x">
|
||||
<button is="emby-button" type="button" class="button-flat btnResume hide detailButton" title="${ButtonResume}" data-mode="resume">
|
||||
<div class="detailButton-content">
|
||||
<span class="material-icons detailButton-icon play_arrow"></span>
|
||||
|
@ -95,17 +95,17 @@
|
|||
<div class="itemDetailsGroup">
|
||||
<div class="detailsGroupItem genresGroup hide">
|
||||
<div class="genresLabel label"></div>
|
||||
<div class="genres content"></div>
|
||||
<div class="genres content focuscontainer-x"></div>
|
||||
</div>
|
||||
|
||||
<div class="detailsGroupItem directorsGroup hide">
|
||||
<div class="directorsLabel label"></div>
|
||||
<div class="directors content"></div>
|
||||
<div class="directors content focuscontainer-x"></div>
|
||||
</div>
|
||||
|
||||
<div class="detailsGroupItem writersGroup hide">
|
||||
<div class="writersLabel label"></div>
|
||||
<div class="writers content"></div>
|
||||
<div class="writers content focuscontainer-x"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -124,7 +124,7 @@
|
|||
</div>
|
||||
</form>
|
||||
|
||||
<div class="recordingFields hide" style="margin: .5em 0 1.5em;"></div>
|
||||
<div class="recordingFields hide" style="margin: 0.5em 0 1.5em;"></div>
|
||||
<div class="detailSectionContent">
|
||||
<div class="itemLastPlayed hide"></div>
|
||||
|
||||
|
@ -139,14 +139,14 @@
|
|||
<p id="itemDeathDate"></p>
|
||||
<p id="seriesAirTime"></p>
|
||||
|
||||
<div class="itemTags hide" style="margin: .7em 0;font-size:92%;"></div>
|
||||
<div class="itemExternalLinks hide" style="margin: .7em 0;font-size:92%;"></div>
|
||||
<div class="itemTags focuscontainer-x hide" style="margin: 0.7em 0; font-size: 92%;"></div>
|
||||
<div class="itemExternalLinks focuscontainer-x hide" style="margin: 0.7em 0; font-size: 92%;"></div>
|
||||
<div class="seriesRecordingEditor"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="seriesTimerScheduleSection verticalSection detailVerticalSection hide" style="margin-top:-3em;">
|
||||
<div class="seriesTimerScheduleSection verticalSection detailVerticalSection hide" style="margin-top: -3em;">
|
||||
<h2 class="sectionTitle">${Schedule}</h2>
|
||||
<div class="seriesTimerSchedule padded-right"></div>
|
||||
</div>
|
||||
|
@ -205,14 +205,14 @@
|
|||
</div>
|
||||
|
||||
<div id="specialsCollapsible" class="verticalSection detailVerticalSection hide">
|
||||
<h2 class="sectionTitle sectionTitle-cards padded-right">${HeaderSpecialFeatures}</h2>
|
||||
<h2 class="sectionTitle sectionTitle-cards padded-right">${SpecialFeatures}</h2>
|
||||
<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">
|
||||
<div id="specialsContent" is="emby-itemscontainer" class="scrollSlider focuscontainer-x itemsContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="musicVideosCollapsible" class="verticalSection detailVerticalSection hide">
|
||||
<h2 class="sectionTitle sectionTitle-cards padded-right">${HeaderMusicVideos}</h2>
|
||||
<h2 class="sectionTitle sectionTitle-cards padded-right">${MusicVideos}</h2>
|
||||
<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">
|
||||
<div id="musicVideosContent" is="emby-itemscontainer" class="scrollSlider focuscontainer-x itemsContainer"></div>
|
||||
</div>
|
||||
|
|
|
@ -205,7 +205,7 @@ function renderVideoSelections(page, mediaSources) {
|
|||
});
|
||||
|
||||
const select = page.querySelector('.selectVideo');
|
||||
select.setLabel(globalize.translate('LabelVideo'));
|
||||
select.setLabel(globalize.translate('Video'));
|
||||
const selectedId = tracks.length ? tracks[0].Index : -1;
|
||||
select.innerHTML = tracks.map(function (v) {
|
||||
const selected = v.Index === selectedId ? ' selected' : '';
|
||||
|
@ -413,7 +413,7 @@ function renderName(item, container, context) {
|
|||
}, {
|
||||
context: context
|
||||
});
|
||||
parentNameHtml.push('<a style="color:inherit;" class="button-link" is="emby-linkbutton" href="' + parentRoute + '">' + item.SeriesName + '</a>');
|
||||
parentNameHtml.push('<a style="color:inherit;" class="button-link" tabindex="-1" is="emby-linkbutton" href="' + parentRoute + '">' + item.SeriesName + '</a>');
|
||||
} else if (item.IsSeries || item.EpisodeTitle) {
|
||||
parentNameHtml.push(item.Name);
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ function renderName(item, container, context) {
|
|||
}, {
|
||||
context: context
|
||||
});
|
||||
parentNameHtml.push('<a style="color:inherit;" class="button-link" is="emby-linkbutton" href="' + parentRoute + '">' + item.SeriesName + '</a>');
|
||||
parentNameHtml.push('<a style="color:inherit;" class="button-link" tabindex="-1" is="emby-linkbutton" href="' + parentRoute + '">' + item.SeriesName + '</a>');
|
||||
} else if (item.ParentIndexNumber != null && item.Type === 'Episode') {
|
||||
parentRoute = appRouter.getRouteUrl({
|
||||
Id: item.SeasonId,
|
||||
|
@ -439,7 +439,7 @@ function renderName(item, container, context) {
|
|||
}, {
|
||||
context: context
|
||||
});
|
||||
parentNameHtml.push('<a style="color:inherit;" class="button-link" is="emby-linkbutton" href="' + parentRoute + '">' + item.SeasonName + '</a>');
|
||||
parentNameHtml.push('<a style="color:inherit;" class="button-link" tabindex="-1" is="emby-linkbutton" href="' + parentRoute + '">' + item.SeasonName + '</a>');
|
||||
} else if (item.ParentIndexNumber != null && item.IsSeries) {
|
||||
parentNameHtml.push(item.SeasonName || 'S' + item.ParentIndexNumber);
|
||||
} else if (item.Album && item.AlbumId && (item.Type === 'MusicVideo' || item.Type === 'Audio')) {
|
||||
|
@ -452,7 +452,7 @@ function renderName(item, container, context) {
|
|||
}, {
|
||||
context: context
|
||||
});
|
||||
parentNameHtml.push('<a style="color:inherit;" class="button-link" is="emby-linkbutton" href="' + parentRoute + '">' + item.Album + '</a>');
|
||||
parentNameHtml.push('<a style="color:inherit;" class="button-link" tabindex="-1" is="emby-linkbutton" href="' + parentRoute + '">' + item.Album + '</a>');
|
||||
} else if (item.Album) {
|
||||
parentNameHtml.push(item.Album);
|
||||
}
|
||||
|
@ -569,9 +569,12 @@ function reloadFromItem(instance, page, params, item, user) {
|
|||
|
||||
// Start rendering the artwork first
|
||||
renderImage(page, item);
|
||||
renderLogo(page, item, apiClient);
|
||||
// Save some screen real estate in TV mode
|
||||
if (!layoutManager.tv) {
|
||||
renderLogo(page, item, apiClient);
|
||||
renderDetailPageBackdrop(page, item, apiClient);
|
||||
}
|
||||
renderBackdrop(item);
|
||||
renderDetailPageBackdrop(page, item, apiClient);
|
||||
|
||||
// Render the main information for the item
|
||||
page.querySelector('.detailPagePrimaryContainer').classList.add('detailRibbon');
|
||||
|
@ -763,6 +766,9 @@ function renderDetailImage(elem, item, imageLoader) {
|
|||
|
||||
elem.innerHTML = cardHtml;
|
||||
imageLoader.lazyChildren(elem);
|
||||
|
||||
// Avoid breaking the design by preventing focus of the poster using the keyboard.
|
||||
elem.querySelector('button').tabIndex = -1;
|
||||
}
|
||||
|
||||
function renderImage(page, item) {
|
||||
|
@ -1058,7 +1064,12 @@ function renderDetails(page, item, apiClient, context, isStatic) {
|
|||
renderOverview(page, item);
|
||||
renderMiscInfo(page, item);
|
||||
reloadUserDataButtons(page, item);
|
||||
renderLinks(page, item);
|
||||
|
||||
// Don't allow redirection to other websites from the TV layout
|
||||
if (!layoutManager.tv) {
|
||||
renderLinks(page, item);
|
||||
}
|
||||
|
||||
renderTags(page, item);
|
||||
renderSeriesAirTime(page, item, isStatic);
|
||||
}
|
||||
|
@ -1336,16 +1347,25 @@ function renderChildren(page, item) {
|
|||
const childrenItemsContainer = page.querySelector('.childrenItemsContainer');
|
||||
|
||||
if (item.Type == 'MusicAlbum') {
|
||||
const equalSet = (arr1, arr2) => arr1.every(x => arr2.indexOf(x) !== -1) && arr1.length === arr2.length;
|
||||
let showArtist = false;
|
||||
for (const track of result.Items) {
|
||||
if (!equalSet(track.ArtistItems.map(x => x.Id), track.AlbumArtists.map(x => x.Id))) {
|
||||
showArtist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const discNumbers = result.Items.map(x => x.ParentIndexNumber);
|
||||
html = listView.getListViewHtml({
|
||||
items: result.Items,
|
||||
smallIcon: true,
|
||||
showIndex: true,
|
||||
showIndex: new Set(discNumbers).size > 1 || (discNumbers.length >= 1 && discNumbers[0] > 1),
|
||||
index: 'disc',
|
||||
showIndexNumberLeft: true,
|
||||
playFromHere: true,
|
||||
action: 'playallfromhere',
|
||||
image: false,
|
||||
artist: 'auto',
|
||||
artist: showArtist,
|
||||
containerAlbumArtists: item.AlbumArtists
|
||||
});
|
||||
isList = true;
|
||||
|
@ -1980,6 +2000,17 @@ export default function (view, params) {
|
|||
let currentItem;
|
||||
const self = this;
|
||||
const apiClient = params.serverId ? window.connectionManager.getApiClient(params.serverId) : ApiClient;
|
||||
|
||||
const btnResume = view.querySelector('.mainDetailButtons .btnResume');
|
||||
const btnPlay = view.querySelector('.mainDetailButtons .btnPlay');
|
||||
if (layoutManager.tv && !btnResume.classList.contains('hide')) {
|
||||
btnResume.classList.add('fab');
|
||||
btnResume.classList.add('detailFloatingButton');
|
||||
} else if (layoutManager.tv && btnResume.classList.contains('hide')) {
|
||||
btnPlay.classList.add('fab');
|
||||
btnPlay.classList.add('detailFloatingButton');
|
||||
}
|
||||
|
||||
view.querySelectorAll('.btnPlay');
|
||||
bindAll(view, '.btnPlay', 'click', onPlayClick);
|
||||
bindAll(view, '.btnResume', 'click', onPlayClick);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue