- ],
- anonymousMenu: [
- {
- label: "Sign in",
- action: () => this.props.dispatch(authActions.LOGIN())
- }
- ]
- }
- };
-
-
- mainAppBarActions: MainAppBarActionProps = {
- onBreadcrumbClick: ({ itemId, status }: NavBreadcrumb) => {
- this.toggleProjectTreeItem(itemId, status);
- },
- onSearch: searchText => {
- this.setState({ searchText });
- this.props.dispatch(push(`/search?q=${searchText}`));
- },
- onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action()
- };
+ };
+
+ render() {
+ const { classes, user } = this.props;
+ return (
+ <div className={classes.root}>
+ <div className={classes.appBar}>
+ <MainAppBar
+ breadcrumbs={Breadcrumbs}
+ searchText={this.state.searchText}
+ user={this.props.user}
+ menuItems={this.state.menuItems}
+ buildInfo={this.props.buildInfo}
+ {...this.mainAppBarActions} />
+ </div>
+ {user && <SidePanel />}
+ <main className={classes.contentWrapper}>
+ <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} />
+ </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>
+ );
+ }
+
+ mainAppBarActions: MainAppBarActionProps = {
+ onSearch: searchText => {
+ this.setState({ searchText });
+ this.props.dispatch(push(`/search?q=${searchText}`));
+ },
+ onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action(),
+ onDetailsPanelToggle: () => {
+ this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
+ },
+ };