Merge branch 'master' into 16812-token-appears-in-the-download-URL
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-item-action-set.ts
index 94f702e822913dda057fa6869925222bd3b7e5ae..6ce62ca942c55e738f79b2b47a295bd7cc220d1a 100644 (file)
@@ -3,28 +3,40 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuActionSet } from "../context-menu-action-set";
-import { RenameIcon, RemoveIcon } from "~/components/icon/icon";
+import { RemoveIcon, RenameIcon } 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 { CollectionFileViewerAction } from '~/views-components/context-menu/actions/collection-file-viewer-action';
+import { CollectionCopyToClipboardAction } from "../actions/collection-copy-to-clipboard-action";
 
-
-export const collectionFilesItemActionSet: ContextMenuActionSet = [[{
-    name: "Rename",
-    icon: RenameIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
+export const readOnlyCollectionFilesItemActionSet: ContextMenuActionSet = [[
+    {
+        component: DownloadCollectionFileAction,
+        execute: () => { return; }
+    },
+    {
+        component: CollectionFileViewerAction,
+        execute: () => { return; },
+    },
+    {
+        component: CollectionCopyToClipboardAction,
+        execute: () => { return; },
     }
-}, {
-    component: DownloadCollectionFileAction,
-    execute: () => { return; }
-}, {
-    name: "Remove",
-    icon: RemoveIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openFileRemoveDialog(resource.uuid));
+]];
+
+export const collectionFilesItemActionSet: ContextMenuActionSet = readOnlyCollectionFilesItemActionSet.concat([[
+    {
+        name: "Rename",
+        icon: RenameIcon,
+        execute: (dispatch, resource) => {
+            dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
+        }
+    },
+    {
+        name: "Remove",
+        icon: RemoveIcon,
+        execute: (dispatch, resource) => {
+            dispatch<any>(openFileRemoveDialog(resource.uuid));
+        }
     }
-}], [{
-    component: FileViewerActions,
-    execute: () => { return; },
-}]];
+]]);
\ No newline at end of file