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 f68994358e5e72bcc60a392642bc920b10903a0d..6ce62ca942c55e738f79b2b47a295bd7cc220d1a 100644 (file)
@@ -3,9 +3,9 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuActionSet } from "../context-menu-action-set";
-import { RemoveIcon } from "~/components/icon/icon";
+import { RemoveIcon, RenameIcon } 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 { openFileRemoveDialog, openRenameFileDialog } from '~/store/collection-panel/collection-panel-files/collection-panel-files-actions';
 import { CollectionFileViewerAction } from '~/views-components/context-menu/actions/collection-file-viewer-action';
 import { CollectionCopyToClipboardAction } from "../actions/collection-copy-to-clipboard-action";
 
@@ -25,14 +25,13 @@ export const readOnlyCollectionFilesItemActionSet: ContextMenuActionSet = [[
 ]];
 
 export const collectionFilesItemActionSet: ContextMenuActionSet = readOnlyCollectionFilesItemActionSet.concat([[
-    // FIXME: This isn't working. Maybe something related to WebDAV?
-    // {
-    //     name: "Rename",
-    //     icon: RenameIcon,
-    //     execute: (dispatch, resource) => {
-    //         dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
-    //     }
-    // },
+    {
+        name: "Rename",
+        icon: RenameIcon,
+        execute: (dispatch, resource) => {
+            dispatch<any>(openRenameFileDialog({ name: resource.name, id: resource.uuid }));
+        }
+    },
     {
         name: "Remove",
         icon: RemoveIcon,