[arvados-workbench2] updated: 2.7.0-231-gee7e9720
git repository hosting
git at public.arvados.org
Fri Dec 1 14:56:23 UTC 2023
Summary of changes:
.../multiselect-toolbar/ms-menu-actions.ts | 24 ++++++++++++++++++++--
.../public-favorites-panel.tsx | 4 +++-
.../search-results-panel/search-results-panel.tsx | 2 ++
3 files changed, 27 insertions(+), 3 deletions(-)
via ee7e972010db2e3e40f9582ba38f33cc063df306 (commit)
from 05005a40d574d97ff9e77b31098332b0d05be08b (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 ee7e972010db2e3e40f9582ba38f33cc063df306
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Dec 1 09:56:17 2023 -0500
21128: admin actions working Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/multiselect-toolbar/ms-menu-actions.ts b/src/views-components/multiselect-toolbar/ms-menu-actions.ts
index b7761d1e..4c6f08cd 100644
--- a/src/views-components/multiselect-toolbar/ms-menu-actions.ts
+++ b/src/views-components/multiselect-toolbar/ms-menu-actions.ts
@@ -7,7 +7,7 @@ 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, FolderSharedIcon, Link, OpenIcon, RemoveFavoriteIcon, ShareIcon } from 'components/icon/icon';
+import { AddFavoriteIcon, AdvancedIcon, DetailsIcon, FolderSharedIcon, Link, OpenIcon, PublicFavoriteIcon, RemoveFavoriteIcon, ShareIcon } 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';
@@ -16,10 +16,13 @@ import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
import { openWebDavS3InfoDialog } from 'store/collections/collection-info-actions';
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";
export const MultiSelectMenuActionNames: Record<string, string> = {
ADD_TO_FAVORITES: 'Add to Favorites',
ADD_TO_TRASH: 'Add to Trash',
+ ADD_TO_PUBLIC_FAVORITES: 'Add to public favorites',
API_DETAILS: 'API Details',
COPY_AND_RERUN_PROCESS: 'Copy and re-run process',
COPY_TO_CLIPBOARD: 'Copy to clipboard',
@@ -51,7 +54,7 @@ export type MultiSelectMenuAction = {
export type MultiSelectMenuActionSet = MultiSelectMenuAction[][];
-const { ADD_TO_FAVORITES, OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, OPEN_W_3RD_PARTY_CLIENT, SHARE } = MultiSelectMenuActionNames;
+const { ADD_TO_FAVORITES, ADD_TO_PUBLIC_FAVORITES, OPEN_IN_NEW_TAB, COPY_TO_CLIPBOARD, VIEW_DETAILS, API_DETAILS, OPEN_W_3RD_PARTY_CLIENT, SHARE } = MultiSelectMenuActionNames;
const msToggleFavoriteAction: MultiSelectMenuAction = {
name: ADD_TO_FAVORITES,
@@ -130,6 +133,22 @@ const msShareAction: MultiSelectMenuAction = {
},
};
+const msTogglePublicFavoriteAction: MultiSelectMenuAction = {
+ name: ADD_TO_PUBLIC_FAVORITES,
+ icon: PublicFavoriteIcon,
+ hasAlts: false,
+ altName: 'Remove from public favorites',
+ altIcon: PublicFavoriteIcon,
+ isForMulti: false,
+ useAlts: (uuid: string, iconProps: {resources: ResourcesState, favorites: FavoritesState}) => false,
+ execute: (dispatch, resources) => {
+ console.log(resources)
+ dispatch<any>(togglePublicFavorite(resources[0])).then(() => {
+ dispatch(publicFavoritePanelActions.REQUEST_ITEMS());
+ });
+ },
+};
+
export const msCommonActionSet = [
msToggleFavoriteAction,
msOpenInNewTabMenuAction,
@@ -138,4 +157,5 @@ export const msCommonActionSet = [
msAdvancedAction,
msOpenWith3rdPartyClientAction,
msShareAction,
+ msTogglePublicFavoriteAction
];
diff --git a/src/views/public-favorites-panel/public-favorites-panel.tsx b/src/views/public-favorites-panel/public-favorites-panel.tsx
index 47c8aede..cb3311e5 100644
--- a/src/views/public-favorites-panel/public-favorites-panel.tsx
+++ b/src/views/public-favorites-panel/public-favorites-panel.tsx
@@ -36,6 +36,7 @@ import { PublicFavoritesState } from 'store/public-favorites/public-favorites-re
import { getResource, ResourcesState } from 'store/resources/resources';
import { GroupContentsResource } from 'services/groups-service/groups-service';
import { CollectionResource } from 'models/collection';
+import { selectOne } from 'store/multiselect/multiselect-actions';
type CssRules = "toolbar" | "button" | "root";
@@ -145,7 +146,8 @@ const mapDispatchToProps = (dispatch: Dispatch): PublicFavoritePanelActionProps
},
onDialogOpen: (ownerUuid: string) => { return; },
onItemClick: (uuid: string) => {
- dispatch<any>(loadDetailsPanel(uuid));
+ dispatch<any>(selectOne(uuid))
+ dispatch<any>(loadDetailsPanel(uuid));
},
onItemDoubleClick: uuid => {
dispatch<any>(navigateTo(uuid));
diff --git a/src/views/search-results-panel/search-results-panel.tsx b/src/views/search-results-panel/search-results-panel.tsx
index 0902f15b..e31cb07f 100644
--- a/src/views/search-results-panel/search-results-panel.tsx
+++ b/src/views/search-results-panel/search-results-panel.tsx
@@ -13,6 +13,7 @@ import { SearchBarAdvancedFormData } from 'models/search-bar';
import { User } from "models/user";
import { Config } from 'common/config';
import { Session } from "models/session";
+import { selectOne } from "store/multiselect/multiselect-actions";
export interface SearchResultsPanelDataProps {
data: SearchBarAdvancedFormData;
@@ -46,6 +47,7 @@ const mapDispatchToProps = (dispatch: Dispatch): SearchResultsPanelActionProps =
},
onDialogOpen: (ownerUuid: string) => { return; },
onItemClick: (resourceUuid: string) => {
+ dispatch<any>(selectOne(resourceUuid))
dispatch<any>(loadDetailsPanel(resourceUuid));
},
onItemDoubleClick: uuid => {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list