import { DetailsResource } from "~/models/details";
import { getResource } from '../../store/resources/resources';
-type CssRules = 'drawerPaper' | 'container' | 'opened' | 'headerContainer' | 'headerIcon' | 'headerTitle' | 'tabContainer';
+type CssRules = 'root' | 'container' | 'opened' | 'headerContainer' | 'headerIcon' | 'headerTitle' | 'tabContainer';
const drawerWidth = 320;
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
- container: {
+ root: {
width: 0,
- position: 'relative',
- height: 'auto',
+ overflowX: 'hidden',
transition: 'width 0.5s ease',
- '&$opened': {
- width: drawerWidth
- }
+ background: theme.palette.background.paper,
+ borderLeft: `1px solid ${theme.palette.divider}`,
+ height: '100%',
+ },
+ opened: {
+ width: drawerWidth,
+ },
+ container: {
+ width: drawerWidth,
},
- opened: {},
drawerPaper: {
position: 'relative',
width: drawerWidth
const { classes, onCloseDrawer, isOpened, item } = this.props;
const { tabsValue } = this.state;
return (
- <Typography component="div"
- className={classnames([classes.container, { [classes.opened]: isOpened }])}>
- <Drawer variant="permanent" anchor="right" classes={{ paper: classes.drawerPaper }}>
- <Typography component="div" className={classes.headerContainer}>
+ <div className={classnames([classes.root, { [classes.opened]: isOpened }])}>
+ <div className={classes.container}>
+ <div className={classes.headerContainer}>
<Grid container alignItems='center' justify='space-around'>
<Grid item xs={2}>
{item.getIcon(classes.headerIcon)}
</IconButton>
</Grid>
</Grid>
- </Typography>
+ </div>
<Tabs value={tabsValue} onChange={this.handleChange}>
<Tab disableRipple label="Details" />
<Tab disableRipple label="Activity" disabled />
{tabsValue === 1 && this.renderTabContainer(
<Grid container direction="column" />
)}
- </Drawer>
- </Typography>
+ </div>
+ </div>
);
}
}
const DRAWER_WITDH = 240;
-type CssRules = 'drawerPaper' | 'toolbar';
+type CssRules = 'root';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
- drawerPaper: {
- position: 'relative',
+ root: {
+ background: theme.palette.background.paper,
+ borderRight: `1px solid ${theme.palette.divider}`,
+ height: '100%',
+ overflowX: 'auto',
width: DRAWER_WITDH,
- display: 'flex',
- flexDirection: 'column',
- paddingTop: 58,
- overflow: 'auto',
- },
- toolbar: theme.mixins.toolbar
+ }
});
const mapDispatchToProps = (dispatch: Dispatch): SidePanelTreeProps => ({
withStyles(styles),
connect(undefined, mapDispatchToProps)
)(({ classes, ...props }: WithStyles<CssRules> & SidePanelTreeProps) =>
- <Drawer
- variant="permanent"
- classes={{ paper: classes.drawerPaper }}>
- <div className={classes.toolbar} />
+ <div className={classes.root}>
<SidePanelTree {...props} />
- </Drawer>);
+ </div>);
import { TrashPanel } from "~/views/trash-panel/trash-panel";
import { MainContentBar } from '../../views-components/main-content-bar/main-content-bar';
+import { Grid } from '@material-ui/core';
-const APP_BAR_HEIGHT = 100;
-
-type CssRules = 'root' | 'appBar' | 'content' | 'contentWrapper';
+type CssRules = 'root' | 'contentWrapper' | 'content' | 'appBar';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
- flexGrow: 1,
- zIndex: 1,
overflow: 'hidden',
- position: 'relative',
- display: 'flex',
width: '100vw',
height: '100vh'
},
- appBar: {
- zIndex: theme.zIndex.drawer + 1,
- position: "absolute",
- width: "100%"
- },
contentWrapper: {
- backgroundColor: theme.palette.background.default,
- display: "flex",
- flexGrow: 1,
+ background: theme.palette.background.default,
minWidth: 0,
- paddingTop: APP_BAR_HEIGHT
},
content: {
- padding: `${theme.spacing.unit}px ${theme.spacing.unit * 3}px`,
- overflowY: "auto",
- flexGrow: 1,
- position: 'relative'
+ minWidth: 0,
+ overflow: 'auto',
+ paddingLeft: theme.spacing.unit * 3,
+ paddingRight: theme.spacing.unit * 3,
},
+ appBar: {
+ zIndex: 1,
+ }
});
interface WorkbenchDataProps {
};
render() {
- const { classes, user } = this.props;
- return (
- <div className={classes.root}>
- <div className={classes.appBar}>
+ return <>
+ <Grid
+ container
+ direction="column"
+ className={this.props.classes.root}>
+ <Grid className={this.props.classes.appBar}>
<MainAppBar
searchText={this.state.searchText}
user={this.props.user}
onSearch={this.onSearch} />
- </div>
- {user && <SidePanel />}
- <main className={classes.contentWrapper}>
- {this.props.user && <MainContentBar />}
- <div className={classes.content}>
- <Switch>
- <Route path={Routes.PROJECTS} component={ProjectPanel} />
- <Route path={Routes.COLLECTIONS} component={CollectionPanel} />
- <Route path={Routes.FAVORITES} component={FavoritePanel} />
- <Route path={Routes.PROCESSES} component={ProcessPanel} />
- <Route path={Routes.TRASH} component={TrashPanel} />
- <Route path={Routes.PROCESS_LOGS} component={ProcessLogPanel} />
- </Switch>
- </div>
- {user && <DetailsPanel />}
- </main>
- <ContextMenu />
- <Snackbar />
- <CreateProjectDialog />
- <CreateCollectionDialog />
- <RenameFileDialog />
- <PartialCopyCollectionDialog />
- <FileRemoveDialog />
- <CopyCollectionDialog />
- <FileRemoveDialog />
- <MultipleFilesRemoveDialog />
- <UpdateCollectionDialog />
- <FilesUploadCollectionDialog />
- <UpdateProjectDialog />
- <MoveCollectionDialog />
- <MoveProjectDialog />
- <CurrentTokenDialog
- currentToken={this.props.currentToken}
- open={this.state.isCurrentTokenDialogOpen}
- handleClose={this.toggleCurrentTokenModal} />
- </div>
- );
+ </Grid>
+ {this.props.user &&
+ <Grid
+ container
+ item
+ xs
+ alignItems="stretch"
+ wrap="nowrap">
+ <Grid item>
+ <SidePanel />
+ </Grid>
+ <Grid
+ container
+ item
+ xs
+ component="main"
+ direction="column"
+ className={this.props.classes.contentWrapper}>
+ <Grid item>
+ <MainContentBar />
+ </Grid>
+ <Grid xs className={this.props.classes.content}>
+ <Switch>
+ <Route path={Routes.PROJECTS} component={ProjectPanel} />
+ <Route path={Routes.COLLECTIONS} component={CollectionPanel} />
+ <Route path={Routes.FAVORITES} component={FavoritePanel} />
+ <Route path={Routes.PROCESSES} component={ProcessPanel} />
+ <Route path={Routes.TRASH} component={TrashPanel} />
+ <Route path={Routes.PROCESS_LOGS} component={ProcessLogPanel} />
+ </Switch>
+ </Grid>
+ </Grid>
+ <Grid item>
+ <DetailsPanel />
+ </Grid>
+ </Grid>}
+ </Grid>
+ <ContextMenu />
+ <Snackbar />
+ <CreateProjectDialog />
+ <CreateCollectionDialog />
+ <RenameFileDialog />
+ <PartialCopyCollectionDialog />
+ <FileRemoveDialog />
+ <CopyCollectionDialog />
+ <FileRemoveDialog />
+ <MultipleFilesRemoveDialog />
+ <UpdateCollectionDialog />
+ <FilesUploadCollectionDialog />
+ <UpdateProjectDialog />
+ <MoveCollectionDialog />
+ <MoveProjectDialog />
+ <CurrentTokenDialog
+ currentToken={this.props.currentToken}
+ open={this.state.isCurrentTokenDialogOpen}
+ handleClose={this.toggleCurrentTokenModal} />
+ </>;
}
onSearch = (searchText: string) => {