mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): workflow library styling
This commit is contained in:
parent
f81d36c95f
commit
b55c2b99a7
@ -180,6 +180,7 @@ const WorkflowLibraryList = () => {
|
|||||||
label={t('common.orderBy')}
|
label={t('common.orderBy')}
|
||||||
isDisabled={isFetching}
|
isDisabled={isFetching}
|
||||||
w={64}
|
w={64}
|
||||||
|
minW={56}
|
||||||
>
|
>
|
||||||
<InvSelect
|
<InvSelect
|
||||||
value={valueOrderBy}
|
value={valueOrderBy}
|
||||||
@ -191,6 +192,7 @@ const WorkflowLibraryList = () => {
|
|||||||
label={t('common.direction')}
|
label={t('common.direction')}
|
||||||
isDisabled={isFetching}
|
isDisabled={isFetching}
|
||||||
w={64}
|
w={64}
|
||||||
|
minW={56}
|
||||||
>
|
>
|
||||||
<InvSelect
|
<InvSelect
|
||||||
value={valueDirection}
|
value={valueDirection}
|
||||||
@ -207,6 +209,7 @@ const WorkflowLibraryList = () => {
|
|||||||
onKeyDown={handleKeydownFilterText}
|
onKeyDown={handleKeydownFilterText}
|
||||||
onChange={handleChangeFilterText}
|
onChange={handleChangeFilterText}
|
||||||
data-testid="workflow-search-input"
|
data-testid="workflow-search-input"
|
||||||
|
minW={64}
|
||||||
/>
|
/>
|
||||||
{query.trim().length && (
|
{query.trim().length && (
|
||||||
<InputRightElement>
|
<InputRightElement>
|
||||||
@ -229,7 +232,7 @@ const WorkflowLibraryList = () => {
|
|||||||
<IAINoContentFallback label={t('workflows.problemLoading')} />
|
<IAINoContentFallback label={t('workflows.problemLoading')} />
|
||||||
) : data.items.length ? (
|
) : data.items.length ? (
|
||||||
<ScrollableContent>
|
<ScrollableContent>
|
||||||
<Flex w="full" h="full" gap={2} px={1} flexDir="column">
|
<Flex w="full" h="full" flexDir="column">
|
||||||
{data.items.map((w) => (
|
{data.items.map((w) => (
|
||||||
<WorkflowLibraryListItem key={w.workflow_id} workflowDTO={w} />
|
<WorkflowLibraryListItem key={w.workflow_id} workflowDTO={w} />
|
||||||
))}
|
))}
|
||||||
|
@ -36,16 +36,31 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex key={workflowDTO.workflow_id} w="full">
|
<Flex
|
||||||
|
key={workflowDTO.workflow_id}
|
||||||
|
w="full"
|
||||||
|
p={2}
|
||||||
|
borderRadius="base"
|
||||||
|
_hover={{ bg: 'base.750' }}
|
||||||
|
>
|
||||||
<Flex w="full" alignItems="center" gap={2} h={12}>
|
<Flex w="full" alignItems="center" gap={2} h={12}>
|
||||||
<Flex flexDir="column" flexGrow={1} h="full">
|
<Flex flexDir="column" flexGrow={1} h="full">
|
||||||
<Flex alignItems="center" w="full" h="50%">
|
<Flex alignItems="center" w="full" h="50%">
|
||||||
<Heading size="sm" variant={isOpen ? 'invokeBlue' : undefined}>
|
<Heading
|
||||||
|
size="sm"
|
||||||
|
noOfLines={1}
|
||||||
|
variant={isOpen ? 'invokeBlue' : undefined}
|
||||||
|
>
|
||||||
{workflowDTO.name || t('workflows.unnamedWorkflow')}
|
{workflowDTO.name || t('workflows.unnamedWorkflow')}
|
||||||
</Heading>
|
</Heading>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
{workflowDTO.category === 'user' && (
|
{workflowDTO.category === 'user' && (
|
||||||
<InvText fontSize="sm" variant="subtext">
|
<InvText
|
||||||
|
fontSize="sm"
|
||||||
|
variant="subtext"
|
||||||
|
flexShrink={0}
|
||||||
|
noOfLines={1}
|
||||||
|
>
|
||||||
{t('common.updated')}:{' '}
|
{t('common.updated')}:{' '}
|
||||||
{dateFormat(workflowDTO.updated_at, masks.shortDate)}{' '}
|
{dateFormat(workflowDTO.updated_at, masks.shortDate)}{' '}
|
||||||
{dateFormat(workflowDTO.updated_at, masks.shortTime)}
|
{dateFormat(workflowDTO.updated_at, masks.shortTime)}
|
||||||
@ -54,7 +69,7 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
<Flex alignItems="center" w="full" h="50%">
|
<Flex alignItems="center" w="full" h="50%">
|
||||||
{workflowDTO.description ? (
|
{workflowDTO.description ? (
|
||||||
<InvText fontSize="sm" noOfLines={1} w="70%">
|
<InvText fontSize="sm" noOfLines={1}>
|
||||||
{workflowDTO.description}
|
{workflowDTO.description}
|
||||||
</InvText>
|
</InvText>
|
||||||
) : (
|
) : (
|
||||||
@ -69,7 +84,12 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
|
|||||||
)}
|
)}
|
||||||
<Spacer />
|
<Spacer />
|
||||||
{workflowDTO.category === 'user' && (
|
{workflowDTO.category === 'user' && (
|
||||||
<InvText fontSize="sm" variant="subtext">
|
<InvText
|
||||||
|
fontSize="sm"
|
||||||
|
variant="subtext"
|
||||||
|
flexShrink={0}
|
||||||
|
noOfLines={1}
|
||||||
|
>
|
||||||
{t('common.created')}:{' '}
|
{t('common.created')}:{' '}
|
||||||
{dateFormat(workflowDTO.created_at, masks.shortDate)}{' '}
|
{dateFormat(workflowDTO.created_at, masks.shortDate)}{' '}
|
||||||
{dateFormat(workflowDTO.created_at, masks.shortTime)}
|
{dateFormat(workflowDTO.created_at, masks.shortTime)}
|
||||||
@ -78,6 +98,7 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
<InvButton
|
<InvButton
|
||||||
|
flexShrink={0}
|
||||||
isDisabled={isOpen}
|
isDisabled={isOpen}
|
||||||
onClick={handleGetAndLoadWorkflow}
|
onClick={handleGetAndLoadWorkflow}
|
||||||
isLoading={getAndLoadWorkflowResult.isLoading}
|
isLoading={getAndLoadWorkflowResult.isLoading}
|
||||||
@ -87,6 +108,7 @@ const WorkflowLibraryListItem = ({ workflowDTO }: Props) => {
|
|||||||
</InvButton>
|
</InvButton>
|
||||||
{workflowDTO.category === 'user' && (
|
{workflowDTO.category === 'user' && (
|
||||||
<InvButton
|
<InvButton
|
||||||
|
flexShrink={0}
|
||||||
colorScheme="error"
|
colorScheme="error"
|
||||||
isDisabled={isOpen}
|
isDisabled={isOpen}
|
||||||
onClick={handleDeleteWorkflow}
|
onClick={handleDeleteWorkflow}
|
||||||
|
@ -23,8 +23,8 @@ const WorkflowLibraryModal = () => {
|
|||||||
h="80%"
|
h="80%"
|
||||||
minW="unset"
|
minW="unset"
|
||||||
minH="unset"
|
minH="unset"
|
||||||
maxW= "1200px"
|
maxW="1200px"
|
||||||
maxH= "600px"
|
maxH="664px"
|
||||||
>
|
>
|
||||||
<InvModalHeader>{t('workflows.workflowLibrary')}</InvModalHeader>
|
<InvModalHeader>{t('workflows.workflowLibrary')}</InvModalHeader>
|
||||||
<InvModalCloseButton />
|
<InvModalCloseButton />
|
||||||
|
Loading…
Reference in New Issue
Block a user