From 8b5ee21b5b8e1dca0613151e4b38df55381d0e6f Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Thu, 25 May 2023 14:40:02 -0400 Subject: [PATCH] 20031: Add icons to collection files action set Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- src/components/icon/icon.tsx | 14 ++++++++++++++ .../action-sets/collection-files-action-set.ts | 10 ++++++++++ .../collection-files-not-selected-action-set.ts | 4 +++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx index 157fb44b3c..b71dc5a405 100644 --- a/src/components/icon/icon.tsx +++ b/src/components/icon/icon.tsx @@ -142,6 +142,18 @@ export const FileMoveIcon: IconType = (props: any) => ; +// https://pictogrammers.com/library/mdi/icon/checkbox-multiple-outline/ +export const CheckboxMultipleOutline: IconType = (props: any) => + + + ; + +// https://pictogrammers.com/library/mdi/icon/checkbox-multiple-blank-outline/ +export const CheckboxMultipleBlankOutline: IconType = (props: any) => + + + ; + export type IconType = React.SFC<{ className?: string, style?: object }>; // https://v4.mui.com/components/material-icons/ @@ -226,3 +238,5 @@ export const InactiveIcon: IconType = (props) => ; export const ImageIcon: IconType = (props) => ; export const StartIcon: IconType = (props) => ; export const StopIcon: IconType = (props) => ; +export const SelectAllIcon: IconType = (props) => ; +export const SelectNoneIcon: IconType = (props) => ; diff --git a/src/views-components/context-menu/action-sets/collection-files-action-set.ts b/src/views-components/context-menu/action-sets/collection-files-action-set.ts index 681ca5b3c0..80deb37cad 100644 --- a/src/views-components/context-menu/action-sets/collection-files-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-files-action-set.ts @@ -10,16 +10,19 @@ import { openCollectionPartialCopyToSeparateCollectionsDialog } from 'store/collections/collection-partial-copy-actions'; import { openCollectionPartialMoveMultipleToExistingCollectionDialog, openCollectionPartialMoveMultipleToNewCollectionDialog, openCollectionPartialMoveToSeparateCollectionsDialog } from "store/collections/collection-partial-move-actions"; +import { FileCopyIcon, FileMoveIcon, RemoveIcon, SelectAllIcon, SelectNoneIcon } from "components/icon/icon"; const copyActions: ContextMenuAction[] = [ { name: "Copy selected into new collection", + icon: FileCopyIcon, execute: dispatch => { dispatch(openCollectionPartialCopyMultipleToNewCollectionDialog()); } }, { name: "Copy selected into existing collection", + icon: FileCopyIcon, execute: dispatch => { dispatch(openCollectionPartialCopyMultipleToExistingCollectionDialog()); } @@ -30,6 +33,7 @@ const copyActionsMultiple: ContextMenuAction[] = [ ...copyActions, { name: "Copy selected into separate collections", + icon: FileCopyIcon, execute: dispatch => { dispatch(openCollectionPartialCopyToSeparateCollectionsDialog()); } @@ -39,12 +43,14 @@ const copyActionsMultiple: ContextMenuAction[] = [ const moveActions: ContextMenuAction[] = [ { name: "Move selected into new collection", + icon: FileMoveIcon, execute: dispatch => { dispatch(openCollectionPartialMoveMultipleToNewCollectionDialog()); } }, { name: "Move selected into existing collection", + icon: FileMoveIcon, execute: dispatch => { dispatch(openCollectionPartialMoveMultipleToExistingCollectionDialog()); } @@ -55,6 +61,7 @@ const moveActionsMultiple: ContextMenuAction[] = [ ...moveActions, { name: "Move selected into separate collections", + icon: FileMoveIcon, execute: dispatch => { dispatch(openCollectionPartialMoveToSeparateCollectionsDialog()); } @@ -64,12 +71,14 @@ const moveActionsMultiple: ContextMenuAction[] = [ const selectActions: ContextMenuAction[] = [ { name: "Select all", + icon: SelectAllIcon, execute: dispatch => { dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES()); } }, { name: "Unselect all", + icon: SelectNoneIcon, execute: dispatch => { dispatch(collectionPanelFilesAction.UNSELECT_ALL_COLLECTION_FILES()); } @@ -78,6 +87,7 @@ const selectActions: ContextMenuAction[] = [ const removeAction: ContextMenuAction = { name: "Remove selected", + icon: RemoveIcon, execute: dispatch => { dispatch(openMultipleFilesRemoveDialog()); } diff --git a/src/views-components/context-menu/action-sets/collection-files-not-selected-action-set.ts b/src/views-components/context-menu/action-sets/collection-files-not-selected-action-set.ts index 1ad13e7418..1e31d11c80 100644 --- a/src/views-components/context-menu/action-sets/collection-files-not-selected-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-files-not-selected-action-set.ts @@ -4,10 +4,12 @@ import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set"; import { collectionPanelFilesAction } from "store/collection-panel/collection-panel-files/collection-panel-files-actions"; +import { SelectAllIcon } from "components/icon/icon"; export const collectionFilesNotSelectedActionSet: ContextMenuActionSet = [[{ name: "Select all", + icon: SelectAllIcon, execute: dispatch => { dispatch(collectionPanelFilesAction.SELECT_ALL_COLLECTION_FILES()); } -}]]; \ No newline at end of file +}]]; -- 2.39.5