@@ -76,7 +76,7 @@ export const Workspace2: React.FC<Workspace2Props> = ({ title, children, hasUnsa
7676 workspaceTitleByWorkspaceName,
7777 setWorkspaceTitle,
7878 } = useWorkspace2Store ( ) ;
79- const { workspaceName, isRootWorkspace, isLeafWorkspace , closeWorkspace } = useContext ( SingleSpaContext ) ;
79+ const { workspaceName, isRootWorkspace, closeWorkspace } = useContext ( SingleSpaContext ) ;
8080
8181 const openedWindowIndex = getOpenedWindowIndexByWorkspace ( workspaceName ) ;
8282
@@ -138,6 +138,7 @@ export const Workspace2: React.FC<Workspace2Props> = ({ title, children, hasUnsa
138138 className = { classNames ( styles . workspaceMiddleContainer , {
139139 [ styles . maximized ] : maximized ,
140140 [ styles . hidden ] : openedWindow . hidden ,
141+ [ styles . isRootWorkspace ] : isRootWorkspace ,
141142 } ) }
142143 >
143144 < div
@@ -147,62 +148,60 @@ export const Workspace2: React.FC<Workspace2Props> = ({ title, children, hasUnsa
147148 [ styles . isRootWorkspace ] : isRootWorkspace ,
148149 } ) }
149150 >
150- { isLeafWorkspace && (
151- < >
152- < Header aria-label = { getCoreTranslation ( 'workspaceHeader' ) } className = { styles . header } >
153- < HeaderName prefix = "" > { title } </ HeaderName >
154- < div className = { styles . overlayHeaderSpacer } />
155- < HeaderGlobalBar className = { styles . headerButtons } >
156- { isDesktop ( layout ) ? (
157- < >
158- { ( canMaximize || maximized ) && (
159- < HeaderGlobalAction
160- aria-label = { maximized ? getCoreTranslation ( 'minimize' ) : getCoreTranslation ( 'maximize' ) }
161- onClick = { ( ) => setWindowMaximized ( windowName , ! maximized ) }
162- >
163- { maximized ? < Minimize /> : < Maximize /> }
164- </ HeaderGlobalAction >
165- ) }
166- { canHide ? (
167- < HeaderGlobalAction
168- aria-label = { getCoreTranslation ( 'hide' ) }
169- onClick = { ( ) => hideWindow ( windowName ) }
170- >
171- < ArrowRightIcon />
172- </ HeaderGlobalAction >
173- ) : (
174- < HeaderGlobalAction
175- aria-label = { getCoreTranslation ( 'close' ) }
176- onClick = { ( ) => closeWorkspace ( { closeWindow : true } ) }
177- >
178- < CloseIcon />
179- </ HeaderGlobalAction >
180- ) }
181- </ >
182- ) : (
183- < >
184- { canHide && (
185- < HeaderGlobalAction
186- aria-label = { getCoreTranslation ( 'hide' ) }
187- onClick = { ( ) => hideWindow ( windowName ) }
188- >
189- < DownToBottom />
190- </ HeaderGlobalAction >
191- ) }
192-
151+ < >
152+ < Header aria-label = { getCoreTranslation ( 'workspaceHeader' ) } className = { styles . header } >
153+ < HeaderName prefix = "" > { title } </ HeaderName >
154+ < div className = { styles . overlayHeaderSpacer } />
155+ < HeaderGlobalBar className = { styles . headerButtons } >
156+ { isDesktop ( layout ) ? (
157+ < >
158+ { ( canMaximize || maximized ) && (
159+ < HeaderGlobalAction
160+ aria-label = { maximized ? getCoreTranslation ( 'minimize' ) : getCoreTranslation ( 'maximize' ) }
161+ onClick = { ( ) => setWindowMaximized ( windowName , ! maximized ) }
162+ >
163+ { maximized ? < Minimize /> : < Maximize /> }
164+ </ HeaderGlobalAction >
165+ ) }
166+ { canHide ? (
167+ < HeaderGlobalAction
168+ aria-label = { getCoreTranslation ( 'hide' ) }
169+ onClick = { ( ) => hideWindow ( windowName ) }
170+ >
171+ < ArrowRightIcon />
172+ </ HeaderGlobalAction >
173+ ) : (
193174 < HeaderGlobalAction
194175 aria-label = { getCoreTranslation ( 'close' ) }
195176 onClick = { ( ) => closeWorkspace ( { closeWindow : true } ) }
196177 >
197178 < CloseIcon />
198179 </ HeaderGlobalAction >
199- </ >
200- ) }
201- </ HeaderGlobalBar >
202- </ Header >
203- < div className = { classNames ( styles . workspaceContent ) } > { children } </ div >
204- </ >
205- ) }
180+ ) }
181+ </ >
182+ ) : (
183+ < >
184+ { canHide && (
185+ < HeaderGlobalAction
186+ aria-label = { getCoreTranslation ( 'hide' ) }
187+ onClick = { ( ) => hideWindow ( windowName ) }
188+ >
189+ < DownToBottom />
190+ </ HeaderGlobalAction >
191+ ) }
192+
193+ < HeaderGlobalAction
194+ aria-label = { getCoreTranslation ( 'close' ) }
195+ onClick = { ( ) => closeWorkspace ( { closeWindow : true } ) }
196+ >
197+ < CloseIcon />
198+ </ HeaderGlobalAction >
199+ </ >
200+ ) }
201+ </ HeaderGlobalBar >
202+ </ Header >
203+ < div className = { classNames ( styles . workspaceContent ) } > { children } </ div >
204+ </ >
206205 </ div >
207206 </ div >
208207 </ div >
0 commit comments