diff --git a/src/components/ModelingSidebar/ModelingSidebar.tsx b/src/components/ModelingSidebar/ModelingSidebar.tsx index ef5046845..69975a3e5 100644 --- a/src/components/ModelingSidebar/ModelingSidebar.tsx +++ b/src/components/ModelingSidebar/ModelingSidebar.tsx @@ -86,7 +86,7 @@ export function ModelingSidebar({ paneOpacity }: ModelingSidebarProps) { ).filter( (pane) => !pane.hideOnPlatform || - (isTauri() + (isDesktop() ? pane.hideOnPlatform === 'web' : pane.hideOnPlatform === 'desktop') ), @@ -142,110 +142,7 @@ export function ModelingSidebar({ paneOpacity }: ModelingSidebarProps) { }} >
- - -
- - ) -} - -interface ModelingSidebarSectionProps extends HTMLAttributes { - panes: SidebarPane[] - alignButtons?: 'start' | 'end' -} - -function ModelingSidebarSection({ - panes, - alignButtons = 'start', - className, - ...props -}: ModelingSidebarSectionProps) { - const { settings } = useSettingsAuthContext() - const showDebugPanel = settings.context.modeling.showDebugPanel - const paneIds = panes.map((pane) => pane.id) - const { send, context } = useModelingContext() - const foundOpenPane = context.store?.openPanes.find((pane) => - paneIds.includes(pane) - ) - const [currentPane, setCurrentPane] = useState( - foundOpenPane || ('none' as SidebarType | 'none') - ) - - const togglePane = useCallback( - (newPane: SidebarType | 'none') => { - if (newPane === 'none') { - send({ - type: 'Set context', - data: { - openPanes: context.store?.openPanes.filter( - (p) => p !== currentPane - ), - }, - }) - setCurrentPane('none') - } else if (newPane === currentPane) { - setCurrentPane('none') - send({ - type: 'Set context', - data: { - openPanes: context.store?.openPanes.filter((p) => p !== newPane), - }, - }) - } else { - send({ - type: 'Set context', - data: { - openPanes: [ - ...context.store?.openPanes.filter((p) => p !== currentPane), - newPane, - ], - }, - }) - setCurrentPane(newPane) - } - }, - [context.store?.openPanes, send, currentPane, setCurrentPane] - ) - - // Filter out the debug panel if it's not supposed to be shown - // TODO: abstract out for allowing user to configure which panes to show - const filteredPanes = ( - showDebugPanel.current ? panes : panes.filter((pane) => pane.id !== 'debug') - ).filter( - (pane) => - !pane.hideOnPlatform || - (isDesktop() - ? pane.hideOnPlatform === 'web' - : pane.hideOnPlatform === 'desktop') - ) - useEffect(() => { - if ( - !showDebugPanel.current && - currentPane === 'debug' && - context.store?.openPanes.includes('debug') - ) { - togglePane('debug') - } - }, [showDebugPanel.current, togglePane, context.store?.openPanes]) - - return ( -
- { - const newPane = index === 0 ? 'none' : paneIds[index - 1] - togglePane(newPane) - }} - > -
- {!isTauri() ? ( + {!isDesktop() ? ( ) : ( diff --git a/src/routes/Onboarding/ProjectMenu.tsx b/src/routes/Onboarding/ProjectMenu.tsx index 21e941445..ad2c1882e 100644 --- a/src/routes/Onboarding/ProjectMenu.tsx +++ b/src/routes/Onboarding/ProjectMenu.tsx @@ -20,8 +20,8 @@ export default function ProjectMenu() {

Project Menu

- Click on {onDesktop ? `your part's name` : `the app name`} in the upper - left to open the project menu, where you can open the project + Click on {onDesktop ? `your part's name` : `the app name`} in the + upper left to open the project menu, where you can open the project settings and export your current part. {onDesktop && ( <> You can click the Zoo logo to quickly navigate home.