diff --git a/src/apps/dashboard/routes/branding/index.tsx b/src/apps/dashboard/routes/branding/index.tsx index d69222bb1..3d2d8d2c7 100644 --- a/src/apps/dashboard/routes/branding/index.tsx +++ b/src/apps/dashboard/routes/branding/index.tsx @@ -19,13 +19,13 @@ import Loading from 'components/loading/LoadingComponent'; import Image from 'components/Image'; import Page from 'components/Page'; import ServerConnections from 'components/ServerConnections'; +import { SPLASHSCREEN_URL } from 'constants/branding'; import { useApi } from 'hooks/useApi'; import globalize from 'lib/globalize'; import { queryClient } from 'utils/query/queryClient'; import { ActionData } from 'types/actionData'; const BRANDING_CONFIG_KEY = 'branding'; -const SPLASHSCREEN_URL = '/Branding/Splashscreen'; const BrandingOption = { CustomCss: 'CustomCss', LoginDisclaimer: 'LoginDisclaimer', diff --git a/src/components/backdrop/backdrop.js b/src/components/backdrop/backdrop.js index 4c64ea818..f99a46a5b 100644 --- a/src/components/backdrop/backdrop.js +++ b/src/components/backdrop/backdrop.js @@ -213,19 +213,19 @@ function enabled() { let rotationInterval; let currentRotatingImages = []; let currentRotationIndex = -1; -export function setBackdrops(items, imageOptions, enableImageRotation, isEnabled = false) { +export function setBackdrops(items, imageOptions, isEnabled = false) { if (isEnabled || enabled()) { const images = getImageUrls(items, imageOptions); if (images.length) { - startRotation(images, enableImageRotation); + setBackdropImages(images); } else { clearBackdrop(); } } } -function startRotation(images, enableImageRotation) { +export function setBackdropImages(images) { if (isEqual(images, currentRotatingImages)) { return; } @@ -235,7 +235,7 @@ function startRotation(images, enableImageRotation) { currentRotatingImages = images; currentRotationIndex = -1; - if (images.length > 1 && enableImageRotation !== false && enableRotation()) { + if (images.length > 1 && enableRotation()) { rotationInterval = setInterval(onRotationInterval, 24000); } diff --git a/src/constants/branding.ts b/src/constants/branding.ts new file mode 100644 index 000000000..36b738c5d --- /dev/null +++ b/src/constants/branding.ts @@ -0,0 +1 @@ +export const SPLASHSCREEN_URL = '/Branding/Splashscreen'; diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index b1545f696..c3f37a155 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -503,7 +503,7 @@ function renderBackdrop(page, item) { // If backdrops are disabled, but the header banner is enabled, add a class to the page to disable the transparency page.classList.toggle('noBackdropTransparency', isBannerEnabled && !userSettings.enableBackdrops()); - setBackdrops([item], null, null, isBannerEnabled); + setBackdrops([item], null, isBannerEnabled); } else { clearBackdrop(); } diff --git a/src/controllers/session/login/index.html b/src/controllers/session/login/index.html index f24bc0d3e..63096a3d7 100644 --- a/src/controllers/session/login/index.html +++ b/src/controllers/session/login/index.html @@ -1,4 +1,4 @@ -