Merge pull request #6771 from thornbill/splash-screen-login
This commit is contained in:
@@ -1,15 +1,5 @@
|
||||
import Box from '@mui/material/Box';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import layoutManager from './layoutManager';
|
||||
import { DRAWER_WIDTH } from './ResponsiveDrawer';
|
||||
|
||||
const styles = layoutManager.experimental ? {
|
||||
left: {
|
||||
md: DRAWER_WIDTH
|
||||
}
|
||||
} : {};
|
||||
|
||||
const Backdrop = () => {
|
||||
useEffect(() => {
|
||||
// Initialize the UI components after first render
|
||||
@@ -18,10 +8,7 @@ const Backdrop = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Box
|
||||
className='backdropContainer'
|
||||
sx={styles}
|
||||
/>
|
||||
<div className='backdropContainer' />
|
||||
<div className='backgroundContainer' />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user