21448: removed share from process menu Arvados-DCO-1.1-Signed-off-by: Lisa Knox ...
authorLisa Knox <lisaknox83@gmail.com>
Fri, 29 Mar 2024 14:26:14 +0000 (10:26 -0400)
committerLisa Knox <lisaknox83@gmail.com>
Fri, 29 Mar 2024 14:26:14 +0000 (10:26 -0400)
services/workbench2/src/views-components/context-menu/action-sets/process-resource-action-set.ts
services/workbench2/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
services/workbench2/src/views-components/multiselect-toolbar/ms-menu-actions.ts
services/workbench2/src/views-components/multiselect-toolbar/ms-project-action-set.ts
services/workbench2/src/views-components/multiselect-toolbar/ms-workflow-action-set.ts

index 40d16e9c8ea343e7374bddcd34a01b3fb0ecb209..33d44ebf60af70cdf2f37781056e323603b01a1c 100644 (file)
@@ -93,13 +93,6 @@ export const processResourceActionSet: ContextMenuActionSet = [
                 dispatch<any>(openProcessUpdateDialog(resources[0]));
             },
         },
-        {
-            icon: ShareIcon,
-            name: ContextMenuActionNames.SHARE,
-            execute: (dispatch, resources) => {
-                dispatch<any>(openSharingDialog(resources[0].uuid));
-            },
-        },
         {
             icon: MoveToIcon,
             name: ContextMenuActionNames.MOVE_TO,
index 3933e7ddb3d4c831c47e72475e577afb00bf10c1..d2e7b51e1d2464db28b04c9958705757f7d65683 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { MoveToIcon, CopyIcon, RenameIcon } from "components/icon/icon";
+import { MoveToIcon, CopyIcon, RenameIcon, ShareIcon } from "components/icon/icon";
 import { openMoveCollectionDialog } from "store/collections/collection-move-actions";
 import { openCollectionCopyDialog, openMultiCollectionCopyDialog } from "store/collections/collection-copy-actions";
 import { toggleCollectionTrashed } from "store/trash/trash-actions";
@@ -13,6 +13,8 @@ import { TrashIcon, Link, FolderSharedIcon } from "components/icon/icon";
 import { openCollectionUpdateDialog } from "store/collections/collection-update-actions";
 import { copyToClipboardAction } from "store/open-in-new-tab/open-in-new-tab.actions";
 import { openWebDavS3InfoDialog } from "store/collections/collection-info-actions";
+import { openSharingDialog } from "store/sharing-dialog/sharing-dialog-actions";
+
 
 const { MAKE_A_COPY, MOVE_TO, MOVE_TO_TRASH, EDIT_COLLECTION, OPEN_IN_NEW_TAB, OPEN_WITH_3RD_PARTY_CLIENT, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, ADD_TO_FAVORITES, SHARE} = ContextMenuActionNames;
 
@@ -77,6 +79,16 @@ const msOpenWith3rdPartyClientAction: MultiSelectMenuAction  = {
     },
 };
 
+const msShareAction: MultiSelectMenuAction  = {
+    name: SHARE,
+    icon: ShareIcon,
+    hasAlts: false,
+    isForMulti: false,
+    execute: (dispatch, resources) => {
+        dispatch<any>(openSharingDialog(resources[0].uuid));
+    },
+};
+
 export const msCollectionActionSet: MultiSelectMenuActionSet = [
     [
         ...msCommonActionSet,
@@ -85,7 +97,8 @@ export const msCollectionActionSet: MultiSelectMenuActionSet = [
         msToggleTrashAction,
         msEditCollection,
         msCopyToClipboardMenuAction,
-        msOpenWith3rdPartyClientAction
+        msOpenWith3rdPartyClientAction,
+        msShareAction,
     ],
 ];
 
index ae3634830867b6ca9fa4a352ce0cc9d140d9cb88..12840cdea2416daab65cc168a08905e49f2572dc 100644 (file)
@@ -7,14 +7,13 @@ import { IconType } from 'components/icon/icon';
 import { ResourcesState } from 'store/resources/resources';
 import { FavoritesState } from 'store/favorites/favorites-reducer';
 import { ContextMenuResource } from 'store/context-menu/context-menu-actions';
-import { AddFavoriteIcon, AdvancedIcon, DetailsIcon, OpenIcon, PublicFavoriteIcon, RemoveFavoriteIcon, ShareIcon } from 'components/icon/icon';
+import { AddFavoriteIcon, AdvancedIcon, DetailsIcon, OpenIcon, PublicFavoriteIcon, RemoveFavoriteIcon } from 'components/icon/icon';
 import { checkFavorite } from 'store/favorites/favorites-reducer';
 import { toggleFavorite } from 'store/favorites/favorites-actions';
 import { favoritePanelActions } from 'store/favorite-panel/favorite-panel-action';
 import { openInNewTabAction } from 'store/open-in-new-tab/open-in-new-tab.actions';
 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
 import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
-import { openSharingDialog } from 'store/sharing-dialog/sharing-dialog-actions';
 import { togglePublicFavorite } from "store/public-favorites/public-favorites-actions";
 import { publicFavoritePanelActions } from "store/public-favorites-panel/public-favorites-action";
 import { PublicFavoritesState } from 'store/public-favorites/public-favorites-reducer';
@@ -34,7 +33,7 @@ export type MultiSelectMenuAction = {
 
 export type MultiSelectMenuActionSet = MultiSelectMenuAction[][];
 
-const { ADD_TO_FAVORITES, ADD_TO_PUBLIC_FAVORITES, OPEN_IN_NEW_TAB, VIEW_DETAILS, API_DETAILS, SHARE } = ContextMenuActionNames;
+const { ADD_TO_FAVORITES, ADD_TO_PUBLIC_FAVORITES, OPEN_IN_NEW_TAB, VIEW_DETAILS, API_DETAILS } = ContextMenuActionNames;
 
 const msToggleFavoriteAction: MultiSelectMenuAction = {
     name: ADD_TO_FAVORITES,
@@ -83,16 +82,6 @@ const msAdvancedAction: MultiSelectMenuAction  = {
     },
 };
 
-const msShareAction: MultiSelectMenuAction  = {
-    name: SHARE,
-    icon: ShareIcon,
-    hasAlts: false,
-    isForMulti: false,
-    execute: (dispatch, resources) => {
-        dispatch<any>(openSharingDialog(resources[0].uuid));
-    },
-};
-
 const msTogglePublicFavoriteAction: MultiSelectMenuAction = {
     name: ADD_TO_PUBLIC_FAVORITES,
     icon: PublicFavoriteIcon,
@@ -115,6 +104,5 @@ export const msCommonActionSet = [
     msOpenInNewTabMenuAction,
     msViewDetailsAction,
     msAdvancedAction,
-    msShareAction,
     msTogglePublicFavoriteAction
 ];
index be072003c9fd3637c9584091de4bd9c1ea4699a2..849dedd36d67c42aa1bca452f9d93128fb30e8f0 100644 (file)
@@ -12,6 +12,7 @@ import {
     NewProjectIcon,
     RenameIcon,
     UnfreezeIcon,
+    ShareIcon,
 } from 'components/icon/icon';
 import { RestoreFromTrashIcon, TrashIcon, FolderSharedIcon, Link } from 'components/icon/icon';
 import { getResource } from 'store/resources/resources';
@@ -20,6 +21,7 @@ import { openProjectUpdateDialog } from 'store/projects/project-update-actions';
 import { freezeProject, unfreezeProject } from 'store/projects/project-lock-actions';
 import { openWebDavS3InfoDialog } from 'store/collections/collection-info-actions';
 import { copyToClipboardAction } from 'store/open-in-new-tab/open-in-new-tab.actions';
+import { openSharingDialog } from 'store/sharing-dialog/sharing-dialog-actions';
 
 const {
     ADD_TO_FAVORITES,
@@ -123,6 +125,16 @@ const msNewProjectAction: MultiSelectMenuAction = {
     },
 };
 
+const msShareAction: MultiSelectMenuAction  = {
+    name: SHARE,
+    icon: ShareIcon,
+    hasAlts: false,
+    isForMulti: false,
+    execute: (dispatch, resources) => {
+        dispatch<any>(openSharingDialog(resources[0].uuid));
+    },
+};
+
 export const msProjectActionSet: MultiSelectMenuActionSet = [
     [
         ...msCommonActionSet,
@@ -132,7 +144,8 @@ export const msProjectActionSet: MultiSelectMenuActionSet = [
         msNewProjectAction,
         msFreezeProjectAction,
         msOpenWith3rdPartyClientAction,
-        msCopyToClipboardMenuAction
+        msCopyToClipboardMenuAction,
+        msShareAction,
     ],
 ];
 
index fd54081681c89db5488342d29ffbd0e0daaf3bf4..25b015b47abfe0695b7cce9aa89c7cd50a94a0a6 100644 (file)
@@ -7,8 +7,10 @@ import { StartIcon, TrashIcon, Link } from 'components/icon/icon';
 import { MultiSelectMenuAction, MultiSelectMenuActionSet, msCommonActionSet } from './ms-menu-actions';
 import { ContextMenuActionNames } from 'views-components/context-menu/context-menu-action-set';
 import { copyToClipboardAction } from 'store/open-in-new-tab/open-in-new-tab.actions';
+import { openSharingDialog } from 'store/sharing-dialog/sharing-dialog-actions';
+import { ShareIcon } from 'components/icon/icon';
 
-const { OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, RUN_WORKFLOW, DELETE_WORKFLOW } = ContextMenuActionNames;
+const { OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, RUN_WORKFLOW, DELETE_WORKFLOW, SHARE } = ContextMenuActionNames;
 
 const msRunWorkflow: MultiSelectMenuAction = {
     name: RUN_WORKFLOW,
@@ -40,7 +42,17 @@ const msCopyToClipboardMenuAction: MultiSelectMenuAction  = {
     },
 };
 
-export const msWorkflowActionSet: MultiSelectMenuActionSet = [[...msCommonActionSet, msRunWorkflow, msDeleteWorkflow, msCopyToClipboardMenuAction]];
+const msShareAction: MultiSelectMenuAction  = {
+    name: SHARE,
+    icon: ShareIcon,
+    hasAlts: false,
+    isForMulti: false,
+    execute: (dispatch, resources) => {
+        dispatch<any>(openSharingDialog(resources[0].uuid));
+    },
+};
+
+export const msWorkflowActionSet: MultiSelectMenuActionSet = [[...msCommonActionSet, msRunWorkflow, msDeleteWorkflow, msCopyToClipboardMenuAction, msShareAction]];
 
 export const msReadOnlyWorkflowActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, RUN_WORKFLOW ]);
 export const msWorkflowActionFilter = new Set([OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, RUN_WORKFLOW, DELETE_WORKFLOW]);