X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a2bf1ed3a15cf55e426c51ad8e6febd7ff2e3020..3367b1ff2a1d1050bb435f7bc8230c03435b2529:/src/views/workbench/workbench.tsx diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx index ad1a2668..776850ce 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'; @@ -41,20 +35,18 @@ import { FilesUploadCollectionDialog } from '~/views-components/dialog-forms/fil import { PartialCopyCollectionDialog } from '~/views-components/dialog-forms/partial-copy-collection-dialog'; import { TrashPanel } from "~/views/trash-panel/trash-panel"; import { MainContentBar } from '~/views-components/main-content-bar/main-content-bar'; -import { Grid, LinearProgress } from '@material-ui/core'; +import { Grid } from '@material-ui/core'; import { SharedWithMePanel } from '../shared-with-me-panel/shared-with-me-panel'; import SplitterLayout from 'react-splitter-layout'; import { ProcessCommandDialog } from '~/views-components/process-command-dialog/process-command-dialog'; -import { isSystemWorking } from "~/store/progress-indicator/progress-indicator-reducer"; +import { WorkflowPanel } from '~/views/workflow-panel/workflow-panel'; -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 * 8 + paddingTop: theme.spacing.unit * 7, + background: theme.palette.background.default }, container: { position: 'relative' @@ -65,127 +57,73 @@ 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; - working: boolean; -} - -interface WorkbenchGeneralProps { - authService: AuthService; - buildInfo: string; -} - -type WorkbenchProps = WorkbenchDataProps & WorkbenchGeneralProps & DispatchProp & WithStyles; +type WorkbenchPanelProps = WithStyles; -interface WorkbenchState { - searchText: string; -} - -export const Workbench = withStyles(styles)( - connect( - (state: RootState) => ({ - user: state.auth.user, - currentToken: state.auth.apiToken, - working: isSystemWorking(state.progressIndicator) - }) - )( - class extends React.Component { - state = { - searchText: "", - }; - render() { - const { classes } = this.props; - return <> - - {this.props.working ? : null} - - - {this.props.user && - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } +export const WorkbenchPanel = + withStyles(styles)(({ classes }: WorkbenchPanelProps) => + + + + + - - - - - - - - - - - - - - - - - - - - - ; - } - - onSearch = (searchText: string) => { - this.setState({ searchText }); - this.props.dispatch(push(`/search?q=${searchText}`)); - } - - toggleDetailsPanel = () => { - this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); - } - - } - ) -); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + );