X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/0a9fd3e65e852b2e27f7051736f10fa81a73ba5d..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 94f702e8..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,28 +3,37 @@ // SPDX-License-Identifier: AGPL-3.0 import { ContextMenuActionSet } from "../context-menu-action-set"; -import { RenameIcon, RemoveIcon } from "~/components/icon/icon"; +import { RemoveIcon } from "~/components/icon/icon"; import { DownloadCollectionFileAction } from "../actions/download-collection-file-action"; -import { openFileRemoveDialog, openRenameFileDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions'; -import { FileViewerActions } from '~/views-components/context-menu/actions/file-viewer-actions'; +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({ name: resource.name, id: resource.uuid })); +export const readOnlyCollectionFilesItemActionSet: ContextMenuActionSet = [[ + { + component: DownloadCollectionFileAction, + execute: () => { return; } + }, + { + component: CollectionFileViewerAction, + execute: () => { return; }, } -}, { - component: DownloadCollectionFileAction, - execute: () => { 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)); + } } -}], [{ - component: FileViewerActions, - execute: () => { return; }, -}]]; +]]); \ No newline at end of file