Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make panels full screen #636

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions client/components/Controllers/File/Panel.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import { useTheme } from '@mui/material/styles'
import ScrollBox from '../../Parts/Boxes/Scroll'
import MetadataPanel from './Panels/Metadata'
import ReportPanel from './Panels/Report'
import SourcePanel from './Panels/Source'
import * as store from '@client/store'

export default function Layout() {
const theme = useTheme()
const panel = store.useStore((state) => state.panel)

return (
<ScrollBox
hidden={!panel}
height={theme.spacing(42)}
sx={{ borderTop: 'solid 1px #ddd' }}
height="100%"
sx={{ borderTop: 'solid 1px #ddd', position: 'absolute', backgroundColor: 'white' }}
>
{panel === 'metadata' && <MetadataPanel />}
{panel === 'report' && <ReportPanel />}
Expand Down
10 changes: 6 additions & 4 deletions client/components/Controllers/File/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ export default function File() {
}}
>
<Menu />
<ScrollBox sx={{ flexGrow: 1, zIndex: 10 }}>
<View />
</ScrollBox>
<Panel />
<Box sx={{ flexGrow: 1, display: 'flex', zIndex: 10 }}>
<ScrollBox sx={{ flexGrow: 1 }}>
<View />
</ScrollBox>
<Panel />
</Box>
</Box>
)
}
4 changes: 1 addition & 3 deletions client/components/Controllers/Table/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ import ScrollBox from '../../Parts/Boxes/Scroll'
import MetadataPanel from './Panels/Metadata'
import ReportPanel from './Panels/Report'
import SourcePanel from './Panels/Source'
import { useTheme } from '@mui/material/styles'
import * as store from '@client/store'

export default function Panel() {
const theme = useTheme()
const panel = store.useStore((state) => state.panel)

return (
<ScrollBox
hidden={!panel}
height={theme.spacing(42)}
height={'100%'}
sx={{
borderTop: 'solid 1px #ddd',
backgroundColor: 'white',
Expand Down
10 changes: 6 additions & 4 deletions client/components/Controllers/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ export default function Table() {
}}
>
<Menu />
<ScrollBox sx={{ flexGrow: 1, zIndex: 10 }}>
<Editor />
</ScrollBox>
<Panel />
<Box sx={{ flexGrow: 1, display: 'flex', zIndex: 10 }}>
<ScrollBox sx={{ flexGrow: 1 }}>
<Editor />
</ScrollBox>
<Panel />
</Box>
</Box>
)
}
6 changes: 2 additions & 4 deletions client/components/Controllers/Text/Panel.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { useTheme } from '@mui/material/styles'
import ScrollBox from '../../Parts/Boxes/Scroll'
import MetadataPanel from './Panels/Metadata'
import ReportPanel from './Panels/Report'
import * as store from '@client/store'

export default function Layout() {
const theme = useTheme()
const panel = store.useStore((state) => state.panel)

return (
<ScrollBox
hidden={!panel}
height={theme.spacing(42)}
sx={{ borderTop: 'solid 1px #ddd' }}
height="100%"
sx={{ borderTop: 'solid 1px #ddd', position: 'absolute', backgroundColor: 'white' }}
>
{panel === 'metadata' && <MetadataPanel />}
{panel === 'report' && <ReportPanel />}
Expand Down
8 changes: 5 additions & 3 deletions client/components/Controllers/Text/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ export default function Text() {
}}
>
<Menu />
<Box sx={{ flexGrow: 1, zIndex: 10 }}>
<Editor />
<Box sx={{ flexGrow: 1, display: 'flex', zIndex: 10 }}>
<Box sx={{ flexGrow: 1 }}>
<Editor />
</Box>
<Panel />
</Box>
<Panel />
</Box>
)
}
1 change: 1 addition & 0 deletions client/components/Editors/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ function LoadMask(props: { visible: boolean; zIndex: number }) {
opacity: 0.6,
background: 'rgba(121, 134, 203, 0.25)',
zIndex: props.zIndex,
position: 'absolute',
}}
>
<SpinnerCard message="Loading" />
Expand Down
Loading