feat(ui): sticky board list header

This commit is contained in:
psychedelicious 2024-07-10 18:38:01 +10:00 committed by Kent Keirsey
parent b70e87f25b
commit 7db767b7c3

View File

@ -43,14 +43,24 @@ const BoardsList = () => {
<Flex flexDir="column" gap={2} borderRadius="base" maxHeight="100%">
<OverlayScrollbarsComponent defer style={overlayScrollbarsStyles} options={overlayScrollbarsParams.options}>
{allowPrivateBoards && (
<>
<Flex w="full" justifyContent="space-between" alignItems="center" ps={2} py={1}>
<Text fontSize="md" fontWeight="medium" userSelect="none">
<Flex direction="column" gap={1}>
<Flex
position="sticky"
w="full"
justifyContent="space-between"
alignItems="center"
ps={2}
py={1}
zIndex={1}
top={0}
bg="base.900"
>
<Text fontSize="md" fontWeight="semibold" userSelect="none">
{t('boards.private')}
</Text>
<AddBoardButton isPrivateBoard={true} />
</Flex>
<Flex direction="column" maxH={100} gap={1}>
<Flex direction="column" gap={1}>
<NoBoardBoard isSelected={selectedBoardId === 'none'} />
{filteredPrivateBoards.map((board) => (
<GalleryBoard
@ -61,10 +71,21 @@ const BoardsList = () => {
/>
))}
</Flex>
</>
</Flex>
)}
<Flex w="full" justifyContent="space-between" alignItems="center" ps={2} py={1}>
<Text fontSize="md" fontWeight="medium" userSelect="none">
<Flex direction="column" gap={1}>
<Flex
position="sticky"
w="full"
justifyContent="space-between"
alignItems="center"
ps={2}
py={1}
zIndex={1}
top={0}
bg="base.900"
>
<Text fontSize="md" fontWeight="semibold" userSelect="none">
{allowPrivateBoards ? t('boards.shared') : t('boards.boards')}
</Text>
<AddBoardButton isPrivateBoard={false} />
@ -80,6 +101,7 @@ const BoardsList = () => {
/>
))}
</Flex>
</Flex>
</OverlayScrollbarsComponent>
</Flex>
<DeleteBoardModal boardToDelete={boardToDelete} setBoardToDelete={setBoardToDelete} />