X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/2fb4478d11d805b9a5654f5656f74d3a0e0da46b..f1db282d059c1d0a6e264943344e09bda5d40282:/src/views-components/context-menu/action-sets/project-action-set.ts?ds=inline diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts index 36b8eef0..660d7ea0 100644 --- a/src/views-components/context-menu/action-sets/project-action-set.ts +++ b/src/views-components/context-menu/action-sets/project-action-set.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0 import { ContextMenuActionSet } from "../context-menu-action-set"; -import { NewProjectIcon, RenameIcon, CopyIcon, MoveToIcon } from "~/components/icon/icon"; +import { NewProjectIcon, RenameIcon, CopyIcon, MoveToIcon, DetailsIcon, AdvancedIcon } from '~/components/icon/icon'; import { ToggleFavoriteAction } from "../actions/favorite-action"; import { toggleFavorite } from "~/store/favorites/favorites-actions"; import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action"; @@ -12,7 +12,10 @@ import { openProjectCreateDialog } from '~/store/projects/project-create-actions import { openProjectUpdateDialog } from '~/store/projects/project-update-actions'; import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action"; import { toggleProjectTrashed } from "~/store/trash/trash-actions"; -import { openFileSelectionDialog } from '../../../store/file-selection/file-selection-actions'; +import { ShareIcon } from '~/components/icon/icon'; +import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions"; +import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab"; +import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action'; export const projectActionSet: ContextMenuActionSet = [[ { @@ -29,6 +32,13 @@ export const projectActionSet: ContextMenuActionSet = [[ dispatch(openProjectUpdateDialog(resource)); } }, + { + icon: ShareIcon, + name: "Share", + execute: (dispatch, { uuid }) => { + dispatch(openSharingDialog(uuid)); + } + }, { component: ToggleFavoriteAction, execute: (dispatch, resource) => { @@ -38,21 +48,37 @@ export const projectActionSet: ContextMenuActionSet = [[ } }, { - component: ToggleTrashAction, + icon: MoveToIcon, + name: "Move to", execute: (dispatch, resource) => { - dispatch(toggleProjectTrashed(resource.uuid, resource.ownerUuid, resource.isTrashed!!)); + dispatch(openMoveProjectDialog(resource)); } }, + // { + // icon: CopyIcon, + // name: "Copy to project", + // execute: (dispatch, resource) => { + // // add code + // } + // }, { - icon: MoveToIcon, - name: "Move to", - execute: (dispatch, resource) => dispatch(openFileSelectionDialog()) + icon: DetailsIcon, + name: "View details", + execute: dispatch => { + dispatch(toggleDetailsPanel()); + } + }, + { + icon: AdvancedIcon, + name: "Advanced", + execute: (dispatch, resource) => { + dispatch(openAdvancedTabDialog(resource.uuid)); + } }, { - icon: CopyIcon, - name: "Copy to project", + component: ToggleTrashAction, execute: (dispatch, resource) => { - // add code + dispatch(toggleProjectTrashed(resource.uuid, resource.ownerUuid, resource.isTrashed!!)); } }, ]];