mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4774 from thornbill/owner-of-a-lonely-if
This commit is contained in:
commit
bb44ba022d
23 changed files with 155 additions and 223 deletions
|
@ -835,26 +835,24 @@ function updateMenuForPageType(isDashboardPage, isLibraryPage) {
|
|||
bodyClassList.remove('dashboardDocument');
|
||||
bodyClassList.remove('hideMainDrawer');
|
||||
|
||||
if (navDrawerInstance) {
|
||||
navDrawerInstance.setEdgeSwipeEnabled(true);
|
||||
}
|
||||
} else if (isDashboardPage) {
|
||||
bodyClassList.remove('libraryDocument');
|
||||
bodyClassList.add('dashboardDocument');
|
||||
bodyClassList.remove('hideMainDrawer');
|
||||
|
||||
if (navDrawerInstance) {
|
||||
navDrawerInstance.setEdgeSwipeEnabled(true);
|
||||
}
|
||||
} else {
|
||||
if (isDashboardPage) {
|
||||
bodyClassList.remove('libraryDocument');
|
||||
bodyClassList.add('dashboardDocument');
|
||||
bodyClassList.remove('hideMainDrawer');
|
||||
bodyClassList.remove('libraryDocument');
|
||||
bodyClassList.remove('dashboardDocument');
|
||||
bodyClassList.add('hideMainDrawer');
|
||||
|
||||
if (navDrawerInstance) {
|
||||
navDrawerInstance.setEdgeSwipeEnabled(true);
|
||||
}
|
||||
} else {
|
||||
bodyClassList.remove('libraryDocument');
|
||||
bodyClassList.remove('dashboardDocument');
|
||||
bodyClassList.add('hideMainDrawer');
|
||||
|
||||
if (navDrawerInstance) {
|
||||
navDrawerInstance.setEdgeSwipeEnabled(false);
|
||||
}
|
||||
if (navDrawerInstance) {
|
||||
navDrawerInstance.setEdgeSwipeEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,12 +54,10 @@ export function toCenter(container, elem, horizontal, skipWhenVisible) {
|
|||
} else {
|
||||
container.scrollTo(0, pos.center);
|
||||
}
|
||||
} else if (horizontal) {
|
||||
container.scrollLeft = Math.round(pos.center);
|
||||
} else {
|
||||
if (horizontal) {
|
||||
container.scrollLeft = Math.round(pos.center);
|
||||
} else {
|
||||
container.scrollTop = Math.round(pos.center);
|
||||
}
|
||||
container.scrollTop = Math.round(pos.center);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,12 +74,10 @@ export function toStart(container, elem, horizontal, skipWhenVisible) {
|
|||
} else {
|
||||
container.scrollTo(0, pos.start);
|
||||
}
|
||||
} else if (horizontal) {
|
||||
container.scrollLeft = Math.round(pos.start);
|
||||
} else {
|
||||
if (horizontal) {
|
||||
container.scrollLeft = Math.round(pos.start);
|
||||
} else {
|
||||
container.scrollTop = Math.round(pos.start);
|
||||
}
|
||||
container.scrollTop = Math.round(pos.start);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue