Skip to content

Commit 060d698

Browse files
feat(ui): restore image count for boards
1 parent 637802d commit 060d698

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/GalleryBoard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ const GalleryBoard = ({ board, isSelected, setBoardToDelete }: GalleryBoardProps
154154
filter="drop-shadow(0px 0px 0.1rem var(--invoke-colors-base-800))"
155155
/>
156156
)}
157+
<Text variant="subtext">{board.image_count}</Text>
157158

158159
<IAIDroppable data={droppableData} dropLabel={<Text fontSize="md">{t('unifiedCanvas.move')}</Text>} />
159160
</Flex>

invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/NoBoardBoard.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import NoBoardBoardContextMenu from 'features/gallery/components/Boards/NoBoardB
99
import { autoAddBoardIdChanged, boardIdSelected } from 'features/gallery/store/gallerySlice';
1010
import { memo, useCallback, useMemo } from 'react';
1111
import { useTranslation } from 'react-i18next';
12+
import { useGetBoardImagesTotalQuery } from 'services/api/endpoints/boards';
1213
import { useBoardName } from 'services/api/hooks/useBoardName';
1314

1415
interface Props {
@@ -21,6 +22,11 @@ const _hover: SystemStyleObject = {
2122

2223
const NoBoardBoard = memo(({ isSelected }: Props) => {
2324
const dispatch = useAppDispatch();
25+
const { imagesTotal } = useGetBoardImagesTotalQuery('none', {
26+
selectFromResult: ({ data }) => {
27+
return { imagesTotal: data?.total ?? 0 };
28+
},
29+
});
2430
const autoAddBoardId = useAppSelector((s) => s.gallery.autoAddBoardId);
2531
const autoAssignBoardOnClick = useAppSelector((s) => s.gallery.autoAssignBoardOnClick);
2632
const boardName = useBoardName('none');
@@ -77,6 +83,7 @@ const NoBoardBoard = memo(({ isSelected }: Props) => {
7783
{boardName}
7884
</Text>
7985
{autoAddBoardId === 'none' && <AutoAddBadge />}
86+
<Text variant="subtext">{imagesTotal}</Text>
8087
<IAIDroppable data={droppableData} dropLabel={<Text fontSize="md">{t('unifiedCanvas.move')}</Text>} />
8188
</Flex>
8289
</Tooltip>

0 commit comments

Comments
 (0)