X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/75e65fcb253a488da1b3032a54c229cdafdbc9a2..2cfb56ef5060cbad461062690fad650f15c49731:/src/views/workbench/workbench.tsx diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx index 1d7d47d0..788c96ae 100644 --- a/src/views/workbench/workbench.tsx +++ b/src/views/workbench/workbench.tsx @@ -4,22 +4,16 @@ import * as React from 'react'; import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'; -import { connect, DispatchProp } from "react-redux"; import { Route, Switch } from "react-router"; -import { User } from "~/models/user"; -import { RootState } from "~/store/store"; -import { MainAppBar } from '~/views-components/main-app-bar/main-app-bar'; -import { push } from 'react-router-redux'; import { ProjectPanel } from "~/views/project-panel/project-panel"; import { DetailsPanel } from '~/views-components/details-panel/details-panel'; import { ArvadosTheme } from '~/common/custom-theme'; -import { detailsPanelActions } from "~/store/details-panel/details-panel-action"; import { ContextMenu } from "~/views-components/context-menu/context-menu"; import { FavoritePanel } from "../favorite-panel/favorite-panel"; import { CurrentTokenDialog } from '~/views-components/current-token-dialog/current-token-dialog'; +import { RichTextEditorDialog } from '~/views-components/rich-text-editor-dialog/rich-text-editor-dialog'; import { Snackbar } from '~/views-components/snackbar/snackbar'; import { CollectionPanel } from '../collection-panel/collection-panel'; -import { AuthService } from "~/services/auth-service/auth-service"; import { RenameFileDialog } from '~/views-components/rename-file-dialog/rename-file-dialog'; import { FileRemoveDialog } from '~/views-components/file-remove-dialog/file-remove-dialog'; import { MultipleFilesRemoveDialog } from '~/views-components/file-remove-dialog/multiple-files-remove-dialog'; @@ -39,20 +33,28 @@ import { MoveProjectDialog } from '~/views-components/dialog-forms/move-project- import { MoveCollectionDialog } from '~/views-components/dialog-forms/move-collection-dialog'; import { FilesUploadCollectionDialog } from '~/views-components/dialog-forms/files-upload-collection-dialog'; import { PartialCopyCollectionDialog } from '~/views-components/dialog-forms/partial-copy-collection-dialog'; -import { TrashPanel } from "~/views/trash-panel/trash-panel"; +import { ProcessCommandDialog } from '~/views-components/process-command-dialog/process-command-dialog'; import { MainContentBar } from '~/views-components/main-content-bar/main-content-bar'; import { Grid } from '@material-ui/core'; -import { SharedWithMePanel } from '../shared-with-me-panel/shared-with-me-panel'; -import { ProcessCommandDialog } from '~/views-components/process-command-dialog/process-command-dialog'; +import { TrashPanel } from "~/views/trash-panel/trash-panel"; +import { SharedWithMePanel } from '~/views/shared-with-me-panel/shared-with-me-panel'; +import { RunProcessPanel } from '~/views/run-process-panel/run-process-panel'; import SplitterLayout from 'react-splitter-layout'; +import { WorkflowPanel } from '~/views/workflow-panel/workflow-panel'; +import { SearchResultsPanel } from '~/views/search-results-panel/search-results-panel'; +import { HomeTreePicker } from '~/views-components/projects-tree-picker/home-tree-picker'; +import { SharedTreePicker } from '~/views-components/projects-tree-picker/shared-tree-picker'; +import { FavoritesTreePicker } from '../../views-components/projects-tree-picker/favorites-tree-picker'; +import { ProjectsTreePicker } from '~/views-components/projects-tree-picker/projects-tree-picker'; +import { Chips } from '~/components/chips/chips'; +import { ChipsInput } from '../../components/chips-input/chips-input'; -type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content' | 'appBar'; +type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { - overflow: 'hidden', - width: '100vw', - height: '100vh' + paddingTop: theme.spacing.unit * 7, + background: theme.palette.background.default }, container: { position: 'relative' @@ -63,125 +65,74 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ } }, asidePanel: { - height: '100%', - background: theme.palette.background.default + paddingTop: theme.spacing.unit, + height: '100%' }, contentWrapper: { - background: theme.palette.background.default, - minWidth: 0, + paddingTop: theme.spacing.unit, + minWidth: 0 }, content: { minWidth: 0, paddingLeft: theme.spacing.unit * 3, paddingRight: theme.spacing.unit * 3, - }, - appBar: { - zIndex: 1, } }); -interface WorkbenchDataProps { - user?: User; - currentToken?: string; -} - -interface WorkbenchGeneralProps { - authService: AuthService; - buildInfo: string; -} +type WorkbenchPanelProps = WithStyles; -type WorkbenchProps = WorkbenchDataProps & WorkbenchGeneralProps & DispatchProp & WithStyles; - -interface WorkbenchState { - searchText: string; -} - -export const Workbench = withStyles(styles)( - connect( - (state: RootState) => ({ - user: state.auth.user, - currentToken: state.auth.apiToken, - }) - )( - class extends React.Component { - state = { - searchText: "", - }; - render() { - const { classes } = this.props; - return <> - - - +export const WorkbenchPanel = + withStyles(styles)(({ classes }: WorkbenchPanelProps) => + + + + + + + + + + + + + + + + + + + + + + + - {this.props.user && - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - - - - - - - - - - - - - - - - - - - - ; - } - - onSearch = (searchText: string) => { - this.setState({ searchText }); - this.props.dispatch(push(`/search?q=${searchText}`)); - } - - toggleDetailsPanel = () => { - this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); - } - - } - ) -); + + + + + + + + + + + + + + + + + + + + + + + + + + + );