mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update dialogs
This commit is contained in:
parent
4107231554
commit
c00d7cba09
10 changed files with 49 additions and 57 deletions
|
@ -213,14 +213,11 @@
|
|||
|
||||
if (selected == null) {
|
||||
|
||||
var elem = tabs.querySelector('.pageTabButton.is-active');
|
||||
if (elem) {
|
||||
return parseInt(elem.getAttribute('data-index'));
|
||||
}
|
||||
return 0;
|
||||
return tabs.selectedTabIndex || 0;
|
||||
}
|
||||
|
||||
var current = LibraryBrowser.selectedTab(tabs);
|
||||
tabs.selectedTabIndex = selected;
|
||||
if (current == selected) {
|
||||
tabs.dispatchEvent(new CustomEvent("tabchange", {
|
||||
detail: {
|
||||
|
@ -268,13 +265,13 @@
|
|||
LibraryBrowser.configureSwipeTabs(ownerpage, tabs);
|
||||
}
|
||||
|
||||
var buttons = tabs.querySelectorAll('.pageTabButton');
|
||||
for (var i = 0, length = buttons.length; i < length; i++) {
|
||||
//buttons[i].classList.add('mdl-button');
|
||||
//buttons[i].classList.add('mdl-js-button');
|
||||
var div = document.createElement('div');
|
||||
div.classList.add('pageTabButtonSelectionBar');
|
||||
buttons[i].appendChild(div);
|
||||
if (!browserInfo.safari || !AppInfo.isNativeApp) {
|
||||
var buttons = tabs.querySelectorAll('.pageTabButton');
|
||||
for (var i = 0, length = buttons.length; i < length; i++) {
|
||||
var div = document.createElement('div');
|
||||
div.classList.add('pageTabButtonSelectionBar');
|
||||
buttons[i].appendChild(div);
|
||||
}
|
||||
}
|
||||
|
||||
tabs.classList.add('hiddenScrollX');
|
||||
|
@ -1787,20 +1784,20 @@
|
|||
var isSquareAspectRatio = primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .33 ||
|
||||
primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.3333334) < .01;
|
||||
|
||||
if (options.shape == 'auto' || options.shape == 'autohome') {
|
||||
if (options.shape == 'auto' || options.shape == 'autohome' || options.shape == 'autooverflow') {
|
||||
|
||||
if (isThumbAspectRatio) {
|
||||
options.shape = options.shape == 'auto' ? 'backdrop' : 'backdrop';
|
||||
options.shape = options.shape == 'autooverflow' ? 'overflowBackdrop' : 'backdrop';
|
||||
} else if (isSquareAspectRatio) {
|
||||
options.coverImage = true;
|
||||
options.shape = 'square';
|
||||
options.shape = options.shape == 'autooverflow' ? 'overflowSquare' : 'square';
|
||||
} else if (primaryImageAspectRatio && primaryImageAspectRatio > 1.9) {
|
||||
options.shape = 'banner';
|
||||
options.coverImage = true;
|
||||
} else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 0.6666667) < .2) {
|
||||
options.shape = options.shape == 'auto' ? 'portrait' : 'portrait';
|
||||
options.shape = options.shape == 'autooverflow' ? 'overflowPortrait' : 'portrait';
|
||||
} else {
|
||||
options.shape = options.defaultShape || (options.shape == 'auto' ? 'square' : 'square');
|
||||
options.shape = options.defaultShape || (options.shape == 'autooverflow' ? 'overflowSquare' : 'square');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,10 +54,6 @@
|
|||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function getSquareShape() {
|
||||
return enableScrollX() ? 'overflowSquare' : 'square';
|
||||
}
|
||||
|
||||
function enableScrollX() {
|
||||
return browserInfo.mobile && AppInfo.enableAppLayouts;
|
||||
}
|
||||
|
@ -80,14 +76,12 @@
|
|||
|
||||
recordingItems.innerHTML = LibraryBrowser.getPosterViewHtml({
|
||||
items: recordings,
|
||||
shape: (enableScrollX() ? getSquareShape() : 'auto'),
|
||||
shape: (enableScrollX() ? 'autooverflow' : 'auto'),
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
centerText: true,
|
||||
coverImage: true,
|
||||
lazy: true,
|
||||
overlayPlayButton: true
|
||||
|
||||
cardLayout: true
|
||||
});
|
||||
|
||||
ImageLoader.lazyChildren(recordingItems);
|
||||
|
@ -113,7 +107,7 @@
|
|||
ApiClient.getLiveTvRecordings({
|
||||
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
limit: 4,
|
||||
limit: enableScrollX() ? 12 : 4,
|
||||
IsInProgress: false,
|
||||
Fields: 'CanDelete,PrimaryImageAspectRatio'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue