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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue