diff --git a/frontend/src/Editor/Header/GlobalSettings.jsx b/frontend/src/Editor/Header/GlobalSettings.jsx index a659f30b04..c238faf29a 100644 --- a/frontend/src/Editor/Header/GlobalSettings.jsx +++ b/frontend/src/Editor/Header/GlobalSettings.jsx @@ -20,7 +20,6 @@ export const GlobalSettings = ({ darkMode, toggleAppMaintenance, isMaintenanceOn, - // app, backgroundFxQuery, realState, }) => { @@ -233,7 +232,6 @@ export const GlobalSettings = ({ canvasBackgroundColor: resolveReferences(color, realState), backgroundFxQuery: color, }; - globalSettingsChanged(options); }} /> diff --git a/frontend/src/Editor/Inspector/ActionConfigurationPanels/GotoApp.jsx b/frontend/src/Editor/Inspector/ActionConfigurationPanels/GotoApp.jsx index 618a074e94..d42ebee133 100644 --- a/frontend/src/Editor/Inspector/ActionConfigurationPanels/GotoApp.jsx +++ b/frontend/src/Editor/Inspector/ActionConfigurationPanels/GotoApp.jsx @@ -69,7 +69,7 @@ export function GotoApp({ getAllApps, event, handlerChanged, eventIndex, darkMod
queryParamChangeHandler(index, 0, value)} mode="javascript" height={30} @@ -77,7 +77,7 @@ export function GotoApp({ getAllApps, event, handlerChanged, eventIndex, darkMod
queryParamChangeHandler(index, 1, value)} mode="javascript" height={30} diff --git a/frontend/src/Editor/LeftSidebar/index.jsx b/frontend/src/Editor/LeftSidebar/index.jsx index 993c8c37ec..3d317978cd 100644 --- a/frontend/src/Editor/LeftSidebar/index.jsx +++ b/frontend/src/Editor/LeftSidebar/index.jsx @@ -19,6 +19,8 @@ import { useDataSources } from '@/_stores/dataSourcesStore'; import { shallow } from 'zustand/shallow'; import useDebugger from './SidebarDebugger/useDebugger'; import { GlobalSettings } from '../Header/GlobalSettings'; +import { resolveReferences } from '@/_helpers/utils'; +import { useCurrentState } from '@/_stores/currentStateStore'; export const LeftSidebar = forwardRef((props, ref) => { const router = useRouter(); @@ -75,6 +77,7 @@ export const LeftSidebar = forwardRef((props, ref) => { }), shallow ); + const currentState = useCurrentState(); const [pinned, setPinned] = useState(!!localStorage.getItem('selectedSidebarItem')); const { errorLogs, clearErrorLogs, unReadErrorCount, allLog } = useDebugger({ @@ -135,6 +138,8 @@ export const LeftSidebar = forwardRef((props, ref) => { sideBarBtnRefs.current[page] = ref; }; + const backgroundFxQuery = appDefinition?.globalSettings?.backgroundFxQuery; + const SELECTED_ITEMS = { page: ( { toggleAppMaintenance={toggleAppMaintenance} isMaintenanceOn={isMaintenanceOn} app={app} + realState={currentState} + backgroundFxQuery={backgroundFxQuery} /> ), }; + useEffect(() => { + backgroundFxQuery && + globalSettingsChanged({ canvasBackgroundColor: resolveReferences(backgroundFxQuery, currentState) }); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [JSON.stringify(resolveReferences(backgroundFxQuery, currentState))]); + return (