X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/0c46a74e6c0397fa153c345857977f8654ec4471..3d8c3da5fdc9488ac37d09211af8312e77ebebcb:/src/views/workbench/workbench.tsx?ds=inline

diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index a3ee07ee..6a998779 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -10,38 +10,32 @@ import { login, logout } from "~/store/auth/auth-action";
 import { User } from "~/models/user";
 import { RootState } from "~/store/store";
 import { MainAppBar, MainAppBarActionProps, MainAppBarMenuItem } from '~/views-components/main-app-bar/main-app-bar';
-import { Breadcrumb } from '~/components/breadcrumbs/breadcrumbs';
 import { push } from 'react-router-redux';
-import { TreeItem } from "~/components/tree/tree";
 import { ProjectPanel } from "~/views/project-panel/project-panel";
 import { DetailsPanel } from '~/views-components/details-panel/details-panel';
 import { ArvadosTheme } from '~/common/custom-theme';
-import { CreateProjectDialog } from "~/views-components/create-project-dialog/create-project-dialog";
 import { detailsPanelActions } from "~/store/details-panel/details-panel-action";
-import { openContextMenu } from '~/store/context-menu/context-menu-actions';
-import { ProjectResource } from '~/models/project';
-import { ContextMenu, ContextMenuKind } from "~/views-components/context-menu/context-menu";
+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 { Snackbar } from '~/views-components/snackbar/snackbar';
-import { CreateCollectionDialog } from '~/views-components/create-collection-dialog/create-collection-dialog';
 import { CollectionPanel } from '../collection-panel/collection-panel';
-import { UpdateCollectionDialog } from '~/views-components/update-collection-dialog/update-collection-dialog.';
-import { UpdateProjectDialog } from '~/views-components/update-project-dialog/update-project-dialog';
 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';
-import { DialogCollectionCreateWithSelectedFile } from '~/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected';
-import { UploadCollectionFilesDialog } from '~/views-components/upload-collection-files-dialog/upload-collection-files-dialog';
-import { ProjectCopyDialog } from '~/views-components/project-copy-dialog/project-copy-dialog';
-import { CollectionPartialCopyDialog } from '~/views-components/collection-partial-copy-dialog/collection-partial-copy-dialog';
-import { MoveProjectDialog } from '~/views-components/move-project-dialog/move-project-dialog';
-import { MoveCollectionDialog } from '~/views-components/move-collection-dialog/move-collection-dialog';
 import { SidePanel } from '~/views-components/side-panel/side-panel';
 import { Routes } from '~/routes/routes';
-import { navigateTo } from '~/store/navigation/navigation-action';
 import { Breadcrumbs } from '~/views-components/breadcrumbs/breadcrumbs';
+import { CreateProjectDialog } from '~/views-components/dialog-forms/create-project-dialog';
+import { CreateCollectionDialog } from '~/views-components/dialog-forms/create-collection-dialog';
+import { CopyCollectionDialog } from '~/views-components/dialog-forms/copy-collection-dialog';
+import { UpdateCollectionDialog } from '~/views-components/dialog-forms/update-collection-dialog';
+import { UpdateProjectDialog } from '~/views-components/dialog-forms/update-project-dialog';
+import { MoveProjectDialog } from '~/views-components/dialog-forms/move-project-dialog';
+import { MoveCollectionDialog } from '~/views-components/dialog-forms/move-collection-dialog';
+import { CollectionFilesUploadDialog } from '~/views-components/dialog-forms/collection-files-upload-dialog';
+import { CollectionPartialCopyDialog } from '~/views-components/dialog-forms/collection-partial-copy-dialog';
 
 
 const APP_BAR_HEIGHT = 100;
@@ -79,8 +73,6 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 });
 
 interface WorkbenchDataProps {
-    projects: Array<TreeItem<ProjectResource>>;
-    currentProjectId: string;
     user?: User;
     currentToken?: string;
 }
@@ -95,10 +87,6 @@ interface WorkbenchActionProps {
 
 type WorkbenchProps = WorkbenchDataProps & WorkbenchGeneralProps & WorkbenchActionProps & DispatchProp<any> & WithStyles<CssRules>;
 
-interface NavBreadcrumb extends Breadcrumb {
-    itemId: string;
-}
-
 interface NavMenuItem extends MainAppBarMenuItem {
     action: () => void;
 }
@@ -117,8 +105,6 @@ interface WorkbenchState {
 export const Workbench = withStyles(styles)(
     connect<WorkbenchDataProps>(
         (state: RootState) => ({
-            projects: state.projects.items,
-            currentProjectId: state.projects.currentItemId,
             user: state.auth.user,
             currentToken: state.auth.apiToken,
         })
@@ -189,12 +175,11 @@ export const Workbench = withStyles(styles)(
                         <CreateCollectionDialog />
                         <RenameFileDialog />
                         <CollectionPartialCopyDialog />
-                        <DialogCollectionCreateWithSelectedFile />
                         <FileRemoveDialog />
-                        <ProjectCopyDialog />
+                        <CopyCollectionDialog />
                         <MultipleFilesRemoveDialog />
                         <UpdateCollectionDialog />
-                        <UploadCollectionFilesDialog />
+                        <CollectionFilesUploadDialog />
                         <UpdateProjectDialog />
                         <MoveCollectionDialog />
                         <MoveProjectDialog />
@@ -207,9 +192,6 @@ export const Workbench = withStyles(styles)(
             }
 
             mainAppBarActions: MainAppBarActionProps = {
-                onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => {
-                    this.props.dispatch(navigateTo(itemId));
-                },
                 onSearch: searchText => {
                     this.setState({ searchText });
                     this.props.dispatch(push(`/search?q=${searchText}`));
@@ -218,13 +200,6 @@ export const Workbench = withStyles(styles)(
                 onDetailsPanelToggle: () => {
                     this.props.dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
                 },
-                onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: NavBreadcrumb) => {
-                    this.props.dispatch<any>(openContextMenu(event, {
-                        uuid: breadcrumb.itemId,
-                        name: breadcrumb.label,
-                        kind: ContextMenuKind.PROJECT
-                    }));
-                }
             };
 
             toggleCurrentTokenModal = () => {
