X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/876e5e2f31a218255845977489ea70aacc0211cd..f8fb6725beec5b2bf0eec7f375d49f9189ff1bc3:/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts diff --git a/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts b/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts index 8728ad31..2ded3736 100644 --- a/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-files-item-action-set.ts @@ -3,27 +3,37 @@ // SPDX-License-Identifier: AGPL-3.0 import { ContextMenuActionSet } from "../context-menu-action-set"; -import { RenameIcon, DownloadIcon, RemoveIcon } from "~/components/icon/icon"; -import { openRenameFileDialog } from "../../rename-file-dialog/rename-file-dialog"; -import { openFileRemoveDialog } from "../../file-remove-dialog/file-remove-dialog"; +import { RemoveIcon } from "~/components/icon/icon"; +import { DownloadCollectionFileAction } from "../actions/download-collection-file-action"; +import { openFileRemoveDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions'; +import { CollectionFileViewerAction } from '~/views-components/context-menu/actions/collection-file-viewer-action'; -export const collectionFilesItemActionSet: ContextMenuActionSet = [[{ - name: "Rename", - icon: RenameIcon, - execute: (dispatch, resource) => { - dispatch(openRenameFileDialog(resource.name)); +export const readOnlyCollectionFilesItemActionSet: ContextMenuActionSet = [[ + { + component: DownloadCollectionFileAction, + execute: () => { return; } + }, + { + component: CollectionFileViewerAction, + execute: () => { return; }, } -}, { - name: "Download", - icon: DownloadIcon, - execute: (dispatch, resource) => { - return; - } -}, { - name: "Remove", - icon: RemoveIcon, - execute: (dispatch, resource) => { - dispatch(openFileRemoveDialog(resource.uuid)); +]]; + +export const collectionFilesItemActionSet: ContextMenuActionSet = readOnlyCollectionFilesItemActionSet.concat([[ + // FIXME: This isn't working. Maybe something related to WebDAV? + // { + // name: "Rename", + // icon: RenameIcon, + // execute: (dispatch, resource) => { + // dispatch(openRenameFileDialog({ name: resource.name, id: resource.uuid })); + // } + // }, + { + name: "Remove", + icon: RemoveIcon, + execute: (dispatch, resource) => { + dispatch(openFileRemoveDialog(resource.uuid)); + } } -}]]; +]]); \ No newline at end of file