mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-05 09:17:41 +03:00
F OpenNebula/One#6613: Fix view stuck in full screen (#3114)
This commit is contained in:
parent
4fa2dc48e9
commit
02e993a456
@ -39,7 +39,10 @@ const StyledRowButtons = styled(Grid)(() => ({
|
||||
},
|
||||
}))
|
||||
|
||||
const defaultPropsResize = 'auto 1fr auto 1fr'
|
||||
const heightWindowRow = 30
|
||||
const heightGutterRow = 40
|
||||
|
||||
const defaultPropsResize = `${heightWindowRow}px 1fr ${heightGutterRow}px 1fr`
|
||||
|
||||
const ResourcesBackButton = memo(
|
||||
({
|
||||
@ -64,7 +67,7 @@ const ResourcesBackButton = memo(
|
||||
|
||||
useEffect(() => {
|
||||
divided
|
||||
? setPropsResize('auto auto auto 1fr')
|
||||
? setPropsResize(`${heightWindowRow}px 100% ${heightGutterRow}px 1fr`)
|
||||
: setPropsResize(defaultPropsResize)
|
||||
|
||||
!divided && setPageIndex(0)
|
||||
@ -107,7 +110,7 @@ const ResourcesBackButton = memo(
|
||||
}
|
||||
|
||||
return (
|
||||
<SplitPane gridTemplateRows={propsResize}>
|
||||
<SplitPane gridTemplateRows={propsResize} rowMinSize={heightGutterRow}>
|
||||
{({ getGridProps, GutterComponent }) => (
|
||||
<Box
|
||||
height={1}
|
||||
@ -130,22 +133,12 @@ const ResourcesBackButton = memo(
|
||||
</Grid>
|
||||
|
||||
<StyledWindowButtons item xs={4}>
|
||||
{!divided && (
|
||||
<IconButton
|
||||
onClick={() => setDivided(true)}
|
||||
title={Tr(T.DivideWindow)}
|
||||
>
|
||||
<OpenNewWindow />
|
||||
</IconButton>
|
||||
)}
|
||||
{divided && (
|
||||
<IconButton
|
||||
onClick={() => setDivided(false)}
|
||||
title={Tr(T.UnDivideWindow)}
|
||||
>
|
||||
<OpenInWindow />
|
||||
</IconButton>
|
||||
)}
|
||||
<IconButton
|
||||
onClick={() => setDivided(!divided)}
|
||||
title={Tr(T.DivideWindow)}
|
||||
>
|
||||
{divided ? <OpenInWindow /> : <OpenNewWindow />}
|
||||
</IconButton>
|
||||
</StyledWindowButtons>
|
||||
</StyledRowButtons>
|
||||
{divided ? !hasSelectedRows && table(props) : table(props)}
|
||||
|
Loading…
Reference in New Issue
Block a user