[arvados-workbench2] updated: 2.7.0-195-g23a7c88d

git repository hosting git at public.arvados.org
Fri Nov 10 19:17:17 UTC 2023


Summary of changes:
 .../multiselect-toolbar/ms-toolbar-action-filters.ts      |  5 +++--
 .../multiselect-toolbar/ms-project-action-set.ts          | 15 ++++++++++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)

       via  23a7c88df4d188880a2613c826f1537aa8f132af (commit)
      from  3612a36e473bf1599180a9b3b90b03ca0aaafb45 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 23a7c88df4d188880a2613c826f1537aa8f132af
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Fri Nov 10 14:17:13 2023 -0500

    21128: project favorite in place Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts b/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts
index 9145a820..18063da7 100644
--- a/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts
+++ b/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts
@@ -14,15 +14,16 @@ export const contextMenuActionConsts = {
     MAKE_A_COPY: "Make a copy",
     MOVE_TO: "Move to",
     TOGGLE_TRASH_ACTION: "ToggleTrashAction",
+    TOGGLE_FAVORITE_ACTION: "ToggleFavoriteAction",
     COPY_TO_CLIPBOARD: "Copy to clipboard",
     COPY_AND_RERUN_PROCESS: "Copy and re-run process",
     REMOVE: "Remove",
 };
 
-const { MOVE_TO, TOGGLE_TRASH_ACTION, REMOVE, MAKE_A_COPY } = contextMenuActionConsts;
+const { MOVE_TO, TOGGLE_TRASH_ACTION, TOGGLE_FAVORITE_ACTION, REMOVE, MAKE_A_COPY } = contextMenuActionConsts;
 
 //these sets govern what actions are on the ms toolbar for each resource kind
-const projectMSActionsFilter = new Set([MOVE_TO, TOGGLE_TRASH_ACTION]);
+const projectMSActionsFilter = new Set([MOVE_TO, TOGGLE_TRASH_ACTION, TOGGLE_FAVORITE_ACTION]);
 const processResourceMSActionsFilter = new Set([MOVE_TO, REMOVE]);
 const collectionMSActionsFilter = new Set([MAKE_A_COPY, MOVE_TO, TOGGLE_TRASH_ACTION]);
 
diff --git a/src/views-components/multiselect-toolbar/ms-project-action-set.ts b/src/views-components/multiselect-toolbar/ms-project-action-set.ts
index 2b5dfa22..2907686a 100644
--- a/src/views-components/multiselect-toolbar/ms-project-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-project-action-set.ts
@@ -8,6 +8,19 @@ import { openMoveProjectDialog } from "store/projects/project-move-actions";
 import { ToggleTrashAction } from "views-components/context-menu/actions/trash-action";
 import { toggleProjectTrashed } from "store/trash/trash-actions";
 import { copyToClipboardAction } from "store/open-in-new-tab/open-in-new-tab.actions";
+import { ToggleFavoriteAction } from "views-components/context-menu/actions/favorite-action";
+import { toggleFavorite } from "store/favorites/favorites-actions";
+import { favoritePanelActions } from "store/favorite-panel/favorite-panel-action";
+
+export const msToggleFavoriteAction = {
+    component: ToggleFavoriteAction,
+    name: "ToggleFavoriteAction",
+    execute: (dispatch, resources) => {
+        dispatch(toggleFavorite(resources[0])).then(() => {
+            dispatch(favoritePanelActions.REQUEST_ITEMS());
+        });
+    },
+};
 
 export const msCopyToClipboardMenuAction = {
     icon: Link,
@@ -35,4 +48,4 @@ export const msToggleTrashAction = {
     },
 };
 
-export const msProjectActionSet: ContextMenuActionSet = [[msCopyToClipboardMenuAction, msMoveToAction, msToggleTrashAction]];
+export const msProjectActionSet: ContextMenuActionSet = [[msCopyToClipboardMenuAction, msMoveToAction, msToggleTrashAction, msToggleFavoriteAction]];

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list