mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
move Uncategorized back to private board list
This commit is contained in:
parent
80f5f8210a
commit
c2f6b80246
@ -11,6 +11,7 @@ import type { BoardDTO } from 'services/api/types';
|
|||||||
|
|
||||||
import AddBoardButton from './AddBoardButton';
|
import AddBoardButton from './AddBoardButton';
|
||||||
import GalleryBoard from './GalleryBoard';
|
import GalleryBoard from './GalleryBoard';
|
||||||
|
import NoBoardBoard from './NoBoardBoard';
|
||||||
|
|
||||||
export const BoardsList = ({ isPrivate }: { isPrivate?: boolean }) => {
|
export const BoardsList = ({ isPrivate }: { isPrivate?: boolean }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@ -78,24 +79,26 @@ export const BoardsList = ({ isPrivate }: { isPrivate?: boolean }) => {
|
|||||||
<AddBoardButton isPrivateBoard={!!isPrivate} />
|
<AddBoardButton isPrivateBoard={!!isPrivate} />
|
||||||
</Flex>
|
</Flex>
|
||||||
<Collapse in={isOpen}>
|
<Collapse in={isOpen}>
|
||||||
<>
|
<Flex direction="column" gap={1}>
|
||||||
{!filteredBoards.length ? (
|
{(allowPrivateBoards && isPrivate) || !allowPrivateBoards ? (
|
||||||
|
<NoBoardBoard isSelected={selectedBoardId === 'none'} />
|
||||||
|
) : !filteredBoards.length ? (
|
||||||
<Text variant="subtext" textAlign="center">
|
<Text variant="subtext" textAlign="center">
|
||||||
{t('boards.noBoards', { boardType: isPrivate ? 'Private' : '' })}
|
{t('boards.noBoards', { boardType: isPrivate ? 'Private' : '' })}
|
||||||
</Text>
|
</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>
|
</Collapse>
|
||||||
</Flex>
|
</Flex>
|
||||||
<DeleteBoardModal boardToDelete={boardToDelete} setBoardToDelete={setBoardToDelete} />
|
<DeleteBoardModal boardToDelete={boardToDelete} setBoardToDelete={setBoardToDelete} />
|
||||||
|
@ -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 { useAppSelector } from 'app/store/storeHooks';
|
||||||
import { overlayScrollbarsParams } from 'common/components/OverlayScrollbars/constants';
|
import { overlayScrollbarsParams } from 'common/components/OverlayScrollbars/constants';
|
||||||
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
|
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
|
||||||
@ -6,7 +6,6 @@ import type { CSSProperties } from 'react';
|
|||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
|
|
||||||
import { BoardsList } from './BoardsList';
|
import { BoardsList } from './BoardsList';
|
||||||
import NoBoardBoard from './NoBoardBoard';
|
|
||||||
|
|
||||||
const overlayScrollbarsStyles: CSSProperties = {
|
const overlayScrollbarsStyles: CSSProperties = {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
@ -14,7 +13,6 @@ const overlayScrollbarsStyles: CSSProperties = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const BoardsListWrapper = () => {
|
const BoardsListWrapper = () => {
|
||||||
const selectedBoardId = useAppSelector((s) => s.gallery.selectedBoardId);
|
|
||||||
const allowPrivateBoards = useAppSelector((s) => s.config.allowPrivateBoards);
|
const allowPrivateBoards = useAppSelector((s) => s.config.allowPrivateBoards);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -22,8 +20,6 @@ const BoardsListWrapper = () => {
|
|||||||
<Box position="relative" w="full" h="full">
|
<Box position="relative" w="full" h="full">
|
||||||
<Box position="absolute" top={0} right={0} bottom={0} left={0}>
|
<Box position="absolute" top={0} right={0} bottom={0} left={0}>
|
||||||
<OverlayScrollbarsComponent defer style={overlayScrollbarsStyles} options={overlayScrollbarsParams.options}>
|
<OverlayScrollbarsComponent defer style={overlayScrollbarsStyles} options={overlayScrollbarsParams.options}>
|
||||||
<Spacer pt="5px" />
|
|
||||||
<NoBoardBoard isSelected={selectedBoardId === 'none'} />
|
|
||||||
{allowPrivateBoards && <BoardsList isPrivate={true} />}
|
{allowPrivateBoards && <BoardsList isPrivate={true} />}
|
||||||
<BoardsList />
|
<BoardsList />
|
||||||
</OverlayScrollbarsComponent>
|
</OverlayScrollbarsComponent>
|
||||||
|
@ -65,13 +65,15 @@ const NoBoardBoard = memo(({ isSelected }: Props) => {
|
|||||||
bg={isSelected ? 'base.850' : undefined}
|
bg={isSelected ? 'base.850' : undefined}
|
||||||
_hover={_hover}
|
_hover={_hover}
|
||||||
>
|
>
|
||||||
{/* iconified from public/assets/images/invoke-symbol-wht-lrg.svg */}
|
<Flex w="10" justifyContent="space-around">
|
||||||
<Icon boxSize={8} opacity={1} stroke="base.500" viewBox="0 0 66 66" fill="none">
|
{/* iconified from public/assets/images/invoke-symbol-wht-lrg.svg */}
|
||||||
<path
|
<Icon boxSize={8} opacity={1} stroke="base.500" viewBox="0 0 66 66" fill="none">
|
||||||
d="M43.9137 16H63.1211V3H3.12109V16H22.3285L43.9137 50H63.1211V63H3.12109V50H22.3285"
|
<path
|
||||||
strokeWidth="5"
|
d="M43.9137 16H63.1211V3H3.12109V16H22.3285L43.9137 50H63.1211V63H3.12109V50H22.3285"
|
||||||
/>
|
strokeWidth="5"
|
||||||
</Icon>
|
/>
|
||||||
|
</Icon>
|
||||||
|
</Flex>
|
||||||
|
|
||||||
<Text fontSize="sm" fontWeight={isSelected ? 'bold' : 'normal'} noOfLines={1} flexGrow={1}>
|
<Text fontSize="sm" fontWeight={isSelected ? 'bold' : 'normal'} noOfLines={1} flexGrow={1}>
|
||||||
{boardName}
|
{boardName}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user