diff --git a/rsconcept/frontend/src/app/application-layout.tsx b/rsconcept/frontend/src/app/application-layout.tsx index f1c3e34a..b64e0be7 100644 --- a/rsconcept/frontend/src/app/application-layout.tsx +++ b/rsconcept/frontend/src/app/application-layout.tsx @@ -23,6 +23,7 @@ export function ApplicationLayout() { const viewportHeight = useViewportHeight(); const noNavigationAnimation = useAppLayoutStore(state => state.noNavigationAnimation); const noNavigation = useAppLayoutStore(state => state.noNavigation); + const toastBottom = useAppLayoutStore(state => state.toastBottom); const noFooter = useAppLayoutStore(state => state.noFooter); const activeDialog = useDialogsStore(state => state.active); @@ -35,6 +36,8 @@ export function ApplicationLayout() { autoClose={3000} draggable={false} pauseOnFocusLoss={false} + position={toastBottom ? 'bottom-right' : 'top-right'} + newestOnTop={toastBottom} /> }> diff --git a/rsconcept/frontend/src/features/oss/pages/oss-page/editor-oss-graph/side-panel/side-panel.tsx b/rsconcept/frontend/src/features/oss/pages/oss-page/editor-oss-graph/side-panel/side-panel.tsx index b5bbac90..2393a85a 100644 --- a/rsconcept/frontend/src/features/oss/pages/oss-page/editor-oss-graph/side-panel/side-panel.tsx +++ b/rsconcept/frontend/src/features/oss/pages/oss-page/editor-oss-graph/side-panel/side-panel.tsx @@ -1,4 +1,4 @@ -import { Suspense } from 'react'; +import { Suspense, useEffect } from 'react'; import clsx from 'clsx'; import { useDebounce } from 'use-debounce'; @@ -23,6 +23,7 @@ interface SidePanelProps { export function SidePanel({ isMounted, className }: SidePanelProps) { const noNavigationAnimation = useAppLayoutStore(state => state.noNavigationAnimation); + const setToastBottom = useAppLayoutStore(state => state.setToastBottom); const { schema, isMutable, selectedItems } = useOssEdit(); const selectedOperation = selectedItems.length === 1 && selectedItems[0].nodeType === NodeType.OPERATION ? selectedItems[0] : null; @@ -32,8 +33,14 @@ export function SidePanel({ isMounted, className }: SidePanelProps) { const [debouncedMounted] = useDebounce(isMounted, PARAMETER.moveDuration); const closePanel = usePreferencesStore(state => state.toggleShowOssSidePanel); + const showPanel = usePreferencesStore(state => state.showOssSidePanel); const sidePanelHeight = useMainHeight(); + useEffect(() => { + setToastBottom(showPanel); + return () => setToastBottom(false); + }, [setToastBottom, showPanel]); + return (