Merge branch 'master' into connection-manager-global
This commit is contained in:
commit
3cbe0f7264
139 changed files with 1032 additions and 3566 deletions
|
@ -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