mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
remove actions we can get from mutation data
This commit is contained in:
parent
4f95c077d4
commit
dbd6c9c6ed
@ -5,7 +5,6 @@ import {
|
||||
controlAdapterImageChanged,
|
||||
controlAdapterIsEnabledChanged,
|
||||
} from 'features/controlAdapters/store/controlAdaptersSlice';
|
||||
import { imageUploaded } from 'features/gallery/store/actions';
|
||||
import { fieldImageValueChanged } from 'features/nodes/store/nodesSlice';
|
||||
import {
|
||||
initialImageChanged,
|
||||
@ -41,8 +40,6 @@ export const addImageUploadedFulfilledListener = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch(imageUploaded({ postUploadAction: postUploadAction?.type }));
|
||||
|
||||
const DEFAULT_UPLOADED_TOAST: UseToastOptions = {
|
||||
title: t('toast.imageUploaded'),
|
||||
status: 'success',
|
||||
|
@ -5,7 +5,6 @@ import { InvContextMenu } from 'common/components/InvContextMenu/InvContextMenu'
|
||||
import { InvMenuItem } from 'common/components/InvMenu/InvMenuItem';
|
||||
import { InvMenuList } from 'common/components/InvMenu/InvMenuList';
|
||||
import { InvMenuGroup } from 'common/components/InvMenu/wrapper';
|
||||
import { bulkDownloadRequested } from 'features/gallery/store/actions';
|
||||
import {
|
||||
autoAddBoardIdChanged,
|
||||
selectGallerySlice,
|
||||
@ -67,8 +66,6 @@ const BoardContextMenu = ({
|
||||
board_id: board_id,
|
||||
}).unwrap();
|
||||
|
||||
dispatch(bulkDownloadRequested({ type: 'board' }));
|
||||
|
||||
dispatch(
|
||||
addToast({
|
||||
title: t('gallery.preparingDownload'),
|
||||
|
@ -1,6 +1,4 @@
|
||||
import { useAppDispatch } from 'app/store/storeHooks';
|
||||
import { InvIconButton } from 'common/components/InvIconButton/InvIconButton';
|
||||
import { boardCreated } from 'features/gallery/store/actions';
|
||||
import { memo, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { PiPlusBold } from 'react-icons/pi';
|
||||
@ -9,13 +7,10 @@ import { useCreateBoardMutation } from 'services/api/endpoints/boards';
|
||||
const AddBoardButton = () => {
|
||||
const { t } = useTranslation();
|
||||
const [createBoard, { isLoading }] = useCreateBoardMutation();
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const DEFAULT_BOARD_NAME = t('boards.myBoard');
|
||||
const handleCreateBoard = useCallback(async () => {
|
||||
await createBoard(DEFAULT_BOARD_NAME).unwrap();
|
||||
dispatch(boardCreated());
|
||||
}, [createBoard, DEFAULT_BOARD_NAME, dispatch]);
|
||||
const handleCreateBoard = useCallback(() => {
|
||||
createBoard(DEFAULT_BOARD_NAME);
|
||||
}, [createBoard, DEFAULT_BOARD_NAME]);
|
||||
|
||||
return (
|
||||
<InvIconButton
|
||||
|
@ -8,7 +8,6 @@ import {
|
||||
isModalOpenChanged,
|
||||
} from 'features/changeBoardModal/store/slice';
|
||||
import { imagesToDeleteSelected } from 'features/deleteImageModal/store/slice';
|
||||
import { bulkDownloadRequested } from 'features/gallery/store/actions';
|
||||
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
|
||||
import { addToast } from 'features/system/store/systemSlice';
|
||||
import { memo, useCallback, useMemo } from 'react';
|
||||
@ -62,8 +61,6 @@ const MultipleSelectionMenuItems = () => {
|
||||
image_names: selection.map((img) => img.image_name),
|
||||
}).unwrap();
|
||||
|
||||
dispatch(bulkDownloadRequested({ type: 'images' }));
|
||||
|
||||
dispatch(
|
||||
addToast({
|
||||
title: t('gallery.preparingDownload'),
|
||||
|
@ -15,12 +15,3 @@ export const requestedBoardImagesDeletion =
|
||||
export const sentImageToCanvas = createAction('gallery/sentImageToCanvas');
|
||||
|
||||
export const sentImageToImg2Img = createAction('gallery/sentImageToImg2Img');
|
||||
|
||||
export const imageUploaded = createAction<{ postUploadAction?: string }>(
|
||||
'gallery/imageUploaded'
|
||||
);
|
||||
export const boardCreated = createAction('gallery/boardCreated');
|
||||
|
||||
export const bulkDownloadRequested = createAction<{ type: string }>(
|
||||
'gallery/bulkDownloadRequested'
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user