mirror of
https://github.com/IAmParadox27/jellyfin-plugin-media-bar.git
synced 2026-11-13 08:54:19 +01:00
feat: Added configuration variable in javascript for slide animation being enabled or disabled. Defaults to enabled (i.e. no change)
This commit is contained in:
1 parent
425e213476
commit
7ca3f25527
1 file changed
+6
-3
+6
-3
@@ -24,6 +24,7 @@ const CONFIG = {
|
||||
maxItems: 500,
|
||||
preloadCount: 3,
|
||||
fadeTransitionDuration: 500,
|
||||
slideAnimationEnabled: true,
|
||||
};
|
||||
|
||||
// State management
|
||||
@@ -1236,8 +1237,10 @@ const SlideshowManager = {
|
||||
|
||||
currentSlide.classList.add("active");
|
||||
|
||||
currentSlide.querySelector(".backdrop").classList.add("animate");
|
||||
currentSlide.querySelector(".logo").classList.add("animate");
|
||||
if (CONFIG.slideAnimationEnabled) {
|
||||
currentSlide.querySelector(".backdrop").classList.add("animate");
|
||||
currentSlide.querySelector(".logo").classList.add("animate");
|
||||
}
|
||||
|
||||
STATE.slideshow.currentSlideIndex = index;
|
||||
|
||||
@@ -1271,7 +1274,7 @@ const SlideshowManager = {
|
||||
setTimeout(() => {
|
||||
STATE.slideshow.isTransitioning = false;
|
||||
|
||||
if (previousVisibleSlide) {
|
||||
if (previousVisibleSlide && CONFIG.slideAnimationEnabled) {
|
||||
const prevBackdrop = previousVisibleSlide.querySelector(".backdrop");
|
||||
const prevLogo = previousVisibleSlide.querySelector(".logo");
|
||||
if (prevBackdrop) prevBackdrop.classList.remove("animate");
|
||||
|
||||
Reference in new issue
Block a user