[arvados-workbench2] updated: 2.6.0-110-gc11d6bb3

git repository hosting git at public.arvados.org
Wed Sep 20 16:43:27 UTC 2023


Summary of changes:
 .../ms-toolbar-action-filters.ts                   |  4 +--
 .../open-in-new-tab/open-in-new-tab.actions.ts     | 29 ++++++++++------------
 2 files changed, 15 insertions(+), 18 deletions(-)

       via  c11d6bb3f15d4b6f2ba18a26f355bb944a5ef090 (commit)
      from  26d627007be2bd8fc68844b43651b1897a56e391 (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 c11d6bb3f15d4b6f2ba18a26f355bb944a5ef090
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Wed Sep 20 12:43:22 2023 -0400

    15768: fixed copytoclipboard from search results 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 7b786e59..9145a820 100644
--- a/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts
+++ b/src/components/multiselect-toolbar/ms-toolbar-action-filters.ts
@@ -19,10 +19,10 @@ export const contextMenuActionConsts = {
     REMOVE: "Remove",
 };
 
-const { MOVE_TO, TOGGLE_TRASH_ACTION, COPY_TO_CLIPBOARD, REMOVE, MAKE_A_COPY } = contextMenuActionConsts;
+const { MOVE_TO, TOGGLE_TRASH_ACTION, REMOVE, MAKE_A_COPY } = contextMenuActionConsts;
 
 //these sets govern what actions are on the ms toolbar for each resource kind
-const projectMSActionsFilter = new Set([COPY_TO_CLIPBOARD, MOVE_TO, TOGGLE_TRASH_ACTION]);
+const projectMSActionsFilter = new Set([MOVE_TO, TOGGLE_TRASH_ACTION]);
 const processResourceMSActionsFilter = new Set([MOVE_TO, REMOVE]);
 const collectionMSActionsFilter = new Set([MAKE_A_COPY, MOVE_TO, TOGGLE_TRASH_ACTION]);
 
diff --git a/src/store/open-in-new-tab/open-in-new-tab.actions.ts b/src/store/open-in-new-tab/open-in-new-tab.actions.ts
index 7c6c2bb3..83055e32 100644
--- a/src/store/open-in-new-tab/open-in-new-tab.actions.ts
+++ b/src/store/open-in-new-tab/open-in-new-tab.actions.ts
@@ -21,23 +21,20 @@ export const openInNewTabAction = (resource: any) => (dispatch: Dispatch, getSta
 export const copyToClipboardAction = (resources: Array<any>) => (dispatch: Dispatch, getState: () => RootState) => {
     // Copy to clipboard omits token to avoid accidental sharing
 
-    let output = "";
+    let url = getNavUrl(resources[0].uuid, getState().auth, false);
+    let wasCopied;
 
-    for (const resource of [...resources]) {
-        let url = getNavUrl(resource.uuid, getState().auth, false);
-        if (url[0] === "/") url = `${window.location.origin}${url}`;
-        output += output.length ? `,${url}` : url;
+    if (url[0] === "/") wasCopied = copy(`${window.location.origin}${url}`);
+    else if (url.length) {
+        wasCopied = copy(url);
     }
 
-    if (output.length) {
-        const wasCopied = copy(output);
-        if (wasCopied)
-            dispatch(
-                snackbarActions.OPEN_SNACKBAR({
-                    message: "Copied",
-                    hideDuration: 2000,
-                    kind: SnackbarKind.SUCCESS,
-                })
-            );
-    }
+    if (wasCopied)
+        dispatch(
+            snackbarActions.OPEN_SNACKBAR({
+                message: "Copied",
+                hideDuration: 2000,
+                kind: SnackbarKind.SUCCESS,
+            })
+        );
 };

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list