From 6358f39ebb998ca69fad79e1200951ec6db36da6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 26 Jun 2025 19:45:59 +1000 Subject: [PATCH] chore(ui): lint --- .../gallery/components/GalleryTopBar.tsx | 75 ------------------- .../services/events/onInvocationComplete.tsx | 2 - 2 files changed, 77 deletions(-) delete mode 100644 invokeai/frontend/web/src/features/gallery/components/GalleryTopBar.tsx diff --git a/invokeai/frontend/web/src/features/gallery/components/GalleryTopBar.tsx b/invokeai/frontend/web/src/features/gallery/components/GalleryTopBar.tsx deleted file mode 100644 index b3b9bde43c..0000000000 --- a/invokeai/frontend/web/src/features/gallery/components/GalleryTopBar.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { Button, Flex, IconButton } from '@invoke-ai/ui-library'; -import { useStore } from '@nanostores/react'; -import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; -import { useBoardSearchDisclosure } from 'features/gallery/components/Boards/BoardsList/BoardsSearch'; -import { BoardsSettingsPopover } from 'features/gallery/components/Boards/BoardsSettingsPopover'; -import { GalleryHeader } from 'features/gallery/components/GalleryHeader'; -import { selectBoardSearchText } from 'features/gallery/store/gallerySelectors'; -import { boardSearchTextChanged } from 'features/gallery/store/gallerySlice'; -import { useAutoLayoutContext } from 'features/ui/layouts/auto-layout-context'; -import { BOARD_PANEL_DEFAULT_HEIGHT_PX, BOARD_PANEL_MIN_HEIGHT_PX, BOARDS_PANEL_ID } from 'features/ui/layouts/shared'; -import { useCollapsibleGridviewPanel } from 'features/ui/layouts/use-collapsible-gridview-panel'; -import { memo, useCallback } from 'react'; -import { useTranslation } from 'react-i18next'; -import { PiCaretDownBold, PiCaretUpBold, PiMagnifyingGlassBold } from 'react-icons/pi'; - -export const GalleryTopBar = memo(() => { - const { _$rightPanelApi } = useAutoLayoutContext(); - const gridviewPanelApi = useStore(_$rightPanelApi); - const collapsibleApi = useCollapsibleGridviewPanel( - gridviewPanelApi, - BOARDS_PANEL_ID, - 'vertical', - BOARD_PANEL_DEFAULT_HEIGHT_PX, - BOARD_PANEL_MIN_HEIGHT_PX - ); - const isCollapsed = useStore(collapsibleApi.$isCollapsed); - const { t } = useTranslation(); - const dispatch = useAppDispatch(); - const boardSearchText = useAppSelector(selectBoardSearchText); - const boardSearchDisclosure = useBoardSearchDisclosure(); - - const onClickBoardSearch = useCallback(() => { - if (boardSearchText.length) { - dispatch(boardSearchTextChanged('')); - } - if (!boardSearchDisclosure.isOpen && collapsibleApi.$isCollapsed.get()) { - collapsibleApi.expand(); - } - boardSearchDisclosure.toggle(); - }, [boardSearchText.length, boardSearchDisclosure, collapsibleApi, dispatch]); - - return ( - - - - - - - - - - } - colorScheme={boardSearchDisclosure.isOpen ? 'invokeBlue' : 'base'} - /> - - - ); -}); -GalleryTopBar.displayName = 'GalleryTopBar'; diff --git a/invokeai/frontend/web/src/services/events/onInvocationComplete.tsx b/invokeai/frontend/web/src/services/events/onInvocationComplete.tsx index 8e58c315d3..19ae743991 100644 --- a/invokeai/frontend/web/src/services/events/onInvocationComplete.tsx +++ b/invokeai/frontend/web/src/services/events/onInvocationComplete.tsx @@ -127,7 +127,6 @@ export const buildOnInvocationComplete = (getState: AppGetState, dispatch: AppDi // If the image is from a different board, switch to that board & select the image - otherwise just select the // image. This implicitly changes the view to 'images' if it was not already. if (board_id !== selectedBoardId) { - console.log('boardIdSelected'); dispatch( boardIdSelected({ boardId: board_id, @@ -141,7 +140,6 @@ export const buildOnInvocationComplete = (getState: AppGetState, dispatch: AppDi dispatch(galleryViewChanged('images')); } // Select the image immediately since we've optimistically updated the cache - console.log('imageSelected'); dispatch(imageSelected(lastImageDTO.image_name)); } };