move Uncategorized back to private board list

This commit is contained in:
Mary Hipp 2024-07-23 14:10:14 -04:00 committed by psychedelicious
parent 80f5f8210a
commit c2f6b80246
3 changed files with 26 additions and 25 deletions

View File

@ -11,6 +11,7 @@ import type { BoardDTO } from 'services/api/types';
import AddBoardButton from './AddBoardButton';
import GalleryBoard from './GalleryBoard';
import NoBoardBoard from './NoBoardBoard';
export const BoardsList = ({ isPrivate }: { isPrivate?: boolean }) => {
const { t } = useTranslation();
@ -78,24 +79,26 @@ export const BoardsList = ({ isPrivate }: { isPrivate?: boolean }) => {
<AddBoardButton isPrivateBoard={!!isPrivate} />
</Flex>
<Collapse in={isOpen}>
<>
{!filteredBoards.length ? (
<Flex direction="column" gap={1}>
{(allowPrivateBoards && isPrivate) || !allowPrivateBoards ? (
<NoBoardBoard isSelected={selectedBoardId === 'none'} />
) : !filteredBoards.length ? (
<Text variant="subtext" textAlign="center">
{t('boards.noBoards', { boardType: isPrivate ? 'Private' : '' })}
</Text>
) : (
<Flex direction="column" gap={1}>
{filteredBoards.map((board) => (
<GalleryBoard
board={board}
isSelected={selectedBoardId === board.board_id}
setBoardToDelete={setBoardToDelete}
key={board.board_id}
/>
))}
</Flex>
<></>
)}
</>
{filteredBoards.map((board) => (
<GalleryBoard
board={board}
isSelected={selectedBoardId === board.board_id}
setBoardToDelete={setBoardToDelete}
key={board.board_id}
/>
))}
</Flex>
</Collapse>
</Flex>
<DeleteBoardModal boardToDelete={boardToDelete} setBoardToDelete={setBoardToDelete} />

View File

@ -1,4 +1,4 @@
import { Box, Spacer } from '@invoke-ai/ui-library';
import { Box } from '@invoke-ai/ui-library';
import { useAppSelector } from 'app/store/storeHooks';
import { overlayScrollbarsParams } from 'common/components/OverlayScrollbars/constants';
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
@ -6,7 +6,6 @@ import type { CSSProperties } from 'react';
import { memo } from 'react';
import { BoardsList } from './BoardsList';
import NoBoardBoard from './NoBoardBoard';
const overlayScrollbarsStyles: CSSProperties = {
height: '100%',
@ -14,7 +13,6 @@ const overlayScrollbarsStyles: CSSProperties = {
};
const BoardsListWrapper = () => {
const selectedBoardId = useAppSelector((s) => s.gallery.selectedBoardId);
const allowPrivateBoards = useAppSelector((s) => s.config.allowPrivateBoards);
return (
@ -22,8 +20,6 @@ const BoardsListWrapper = () => {
<Box position="relative" w="full" h="full">
<Box position="absolute" top={0} right={0} bottom={0} left={0}>
<OverlayScrollbarsComponent defer style={overlayScrollbarsStyles} options={overlayScrollbarsParams.options}>
<Spacer pt="5px" />
<NoBoardBoard isSelected={selectedBoardId === 'none'} />
{allowPrivateBoards && <BoardsList isPrivate={true} />}
<BoardsList />
</OverlayScrollbarsComponent>

View File

@ -65,13 +65,15 @@ const NoBoardBoard = memo(({ isSelected }: Props) => {
bg={isSelected ? 'base.850' : undefined}
_hover={_hover}
>
{/* iconified from public/assets/images/invoke-symbol-wht-lrg.svg */}
<Icon boxSize={8} opacity={1} stroke="base.500" viewBox="0 0 66 66" fill="none">
<path
d="M43.9137 16H63.1211V3H3.12109V16H22.3285L43.9137 50H63.1211V63H3.12109V50H22.3285"
strokeWidth="5"
/>
</Icon>
<Flex w="10" justifyContent="space-around">
{/* iconified from public/assets/images/invoke-symbol-wht-lrg.svg */}
<Icon boxSize={8} opacity={1} stroke="base.500" viewBox="0 0 66 66" fill="none">
<path
d="M43.9137 16H63.1211V3H3.12109V16H22.3285L43.9137 50H63.1211V63H3.12109V50H22.3285"
strokeWidth="5"
/>
</Icon>
</Flex>
<Text fontSize="sm" fontWeight={isSelected ? 'bold' : 'normal'} noOfLines={1} flexGrow={1}>
{boardName}