mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): simplify auto-add context menu
This commit is contained in:
parent
fc98089960
commit
5396e998b3
@ -5,7 +5,7 @@ import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
|||||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
||||||
import { autoAddBoardIdChanged } from 'features/gallery/store/gallerySlice';
|
import { autoAddBoardIdChanged } from 'features/gallery/store/gallerySlice';
|
||||||
import { memo, useCallback, useMemo } from 'react';
|
import { memo, useCallback, useMemo } from 'react';
|
||||||
import { FaMinus, FaPlus, FaTrash } from 'react-icons/fa';
|
import { FaPlus, FaTrash } from 'react-icons/fa';
|
||||||
import { BoardDTO } from 'services/api/types';
|
import { BoardDTO } from 'services/api/types';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@ -59,16 +59,15 @@ const GalleryBoardContextMenuItems = ({ board, setBoardToDelete }: Props) => {
|
|||||||
</MenuItem> */}
|
</MenuItem> */}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<MenuItem
|
{!isSelectedForAutoAdd && (
|
||||||
icon={isSelectedForAutoAdd ? <FaMinus /> : <FaPlus />}
|
<MenuItem icon={<FaPlus />} onClick={handleToggleAutoAdd}>
|
||||||
onClickCapture={handleToggleAutoAdd}
|
Auto-add to this Board
|
||||||
>
|
|
||||||
{isSelectedForAutoAdd ? 'Disable Auto-Add' : 'Auto-Add to this Board'}
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
)}
|
||||||
<MenuItem
|
<MenuItem
|
||||||
sx={{ color: 'error.600', _dark: { color: 'error.300' } }}
|
sx={{ color: 'error.600', _dark: { color: 'error.300' } }}
|
||||||
icon={<FaTrash />}
|
icon={<FaTrash />}
|
||||||
onClickCapture={handleDelete}
|
onClick={handleDelete}
|
||||||
>
|
>
|
||||||
Delete Board
|
Delete Board
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
@ -17,8 +17,8 @@ const NoBoardContextMenuItems = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{autoAddBoardId && (
|
{autoAddBoardId && (
|
||||||
<MenuItem icon={<FaPlus />} onClickCapture={handleDisableAutoAdd}>
|
<MenuItem icon={<FaPlus />} onClick={handleDisableAutoAdd}>
|
||||||
Disable Auto-Add
|
Auto-add to this Board
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user