mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-19 03:48:18 -07:00
Fix permanent scrollbar for screensaver
This commit is contained in:
parent
3a692f4ed2
commit
517b69550e
4
src/libraries/screensavermanager.css
Normal file
4
src/libraries/screensavermanager.css
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/* own "noScroll" class to avoid conflicts and the need for a scrollbar manager */
|
||||||
|
.screensaver-noScroll {
|
||||||
|
overflow: hidden !important;
|
||||||
|
}
|
@ -3,6 +3,7 @@ import playbackManager from 'playbackManager';
|
|||||||
import pluginManager from 'pluginManager';
|
import pluginManager from 'pluginManager';
|
||||||
import inputManager from 'inputManager';
|
import inputManager from 'inputManager';
|
||||||
import * as userSettings from 'userSettings';
|
import * as userSettings from 'userSettings';
|
||||||
|
import 'css!./screensavermanager.css';
|
||||||
|
|
||||||
function getMinIdleTime() {
|
function getMinIdleTime() {
|
||||||
// Returns the minimum amount of idle time required before the screen saver can be displayed
|
// Returns the minimum amount of idle time required before the screen saver can be displayed
|
||||||
@ -52,6 +53,8 @@ function ScreenSaverManager() {
|
|||||||
|
|
||||||
console.debug('Showing screensaver ' + screensaver.name);
|
console.debug('Showing screensaver ' + screensaver.name);
|
||||||
|
|
||||||
|
document.body.classList.add('screensaver-noScroll');
|
||||||
|
|
||||||
screensaver.show();
|
screensaver.show();
|
||||||
activeScreenSaver = screensaver;
|
activeScreenSaver = screensaver;
|
||||||
|
|
||||||
@ -69,7 +72,9 @@ function ScreenSaverManager() {
|
|||||||
function hide() {
|
function hide() {
|
||||||
if (activeScreenSaver) {
|
if (activeScreenSaver) {
|
||||||
console.debug('Hiding screensaver');
|
console.debug('Hiding screensaver');
|
||||||
activeScreenSaver.hide();
|
activeScreenSaver.hide().then(() => {
|
||||||
|
document.body.classList.remove('screensaver-noScroll');
|
||||||
|
});
|
||||||
activeScreenSaver = null;
|
activeScreenSaver = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ class BackdropScreensaver {
|
|||||||
this.currentSlideshow.hide();
|
this.currentSlideshow.hide();
|
||||||
this.currentSlideshow = null;
|
this.currentSlideshow = null;
|
||||||
}
|
}
|
||||||
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable indent */
|
/* eslint-enable indent */
|
||||||
|
@ -150,16 +150,21 @@ export default function () {
|
|||||||
const elem = document.querySelector('.logoScreenSaver');
|
const elem = document.querySelector('.logoScreenSaver');
|
||||||
|
|
||||||
if (elem) {
|
if (elem) {
|
||||||
const onAnimationFinish = function () {
|
return new Promise((resolve) => {
|
||||||
elem.parentNode.removeChild(elem);
|
const onAnimationFinish = function () {
|
||||||
};
|
elem.parentNode.removeChild(elem);
|
||||||
|
resolve();
|
||||||
|
};
|
||||||
|
|
||||||
if (elem.animate) {
|
if (elem.animate) {
|
||||||
const animation = fadeOut(elem, 1);
|
const animation = fadeOut(elem, 1);
|
||||||
animation.onfinish = onAnimationFinish;
|
animation.onfinish = onAnimationFinish;
|
||||||
} else {
|
} else {
|
||||||
onAnimationFinish();
|
onAnimationFinish();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Promise.resolve();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user