mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
only show selected when greater than 0
This commit is contained in:
parent
afb0651f91
commit
bdff5c4e87
@ -1,4 +1,4 @@
|
|||||||
import { Flex, IconButton, Tag, TagCloseButton, TagLabel, Tooltip } from '@invoke-ai/ui-library';
|
import { Flex, IconButton, Spacer, Tag, TagCloseButton, TagLabel, Tooltip } from '@invoke-ai/ui-library';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
import { useGalleryImages } from 'features/gallery/hooks/useGalleryImages';
|
import { useGalleryImages } from 'features/gallery/hooks/useGalleryImages';
|
||||||
import { selectionChanged } from 'features/gallery/store/gallerySlice';
|
import { selectionChanged } from 'features/gallery/store/gallerySlice';
|
||||||
@ -22,16 +22,18 @@ export const GalleryBulkSelect = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex alignItems="center" justifyContent="space-between">
|
<Flex alignItems="center" justifyContent="space-between">
|
||||||
<Tag>
|
{selection.length > 0 ? (
|
||||||
<TagLabel>
|
<Tag>
|
||||||
{selection.length} {t('common.selected')}
|
<TagLabel>
|
||||||
</TagLabel>
|
{selection.length} {t('common.selected')}
|
||||||
{selection.length > 0 && (
|
</TagLabel>
|
||||||
<Tooltip label="Clear selection">
|
<Tooltip label="Clear selection">
|
||||||
<TagCloseButton onClick={onClickClearSelection} />
|
<TagCloseButton onClick={onClickClearSelection} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
</Tag>
|
||||||
</Tag>
|
) : (
|
||||||
|
<Spacer />
|
||||||
|
)}
|
||||||
|
|
||||||
<Tooltip label={t('gallery.selectAllOnPage')}>
|
<Tooltip label={t('gallery.selectAllOnPage')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
Loading…
Reference in New Issue
Block a user