mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
chore(ui): knip
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
import { Text } from '@invoke-ai/ui-library';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { selectWorkflowName } from 'features/nodes/store/workflowSlice';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const ActiveWorkflowName = memo(() => {
|
||||
const workflowName = useAppSelector(selectWorkflowName);
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (workflowName) {
|
||||
return (
|
||||
<Text fontWeight="semibold" fontSize="md" justifySelf="flex-start" noOfLines={1}>
|
||||
{workflowName}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
// activeWorkflowName is always a string - if it is an empty string, it implies we do not have a workflow selected
|
||||
return (
|
||||
<Text fontSize="md" fontWeight="semibold" color="base.300" noOfLines={1}>
|
||||
{t('workflows.chooseWorkflowFromLibrary')}
|
||||
</Text>
|
||||
);
|
||||
});
|
||||
|
||||
ActiveWorkflowName.displayName = 'ActiveWorkflowName';
|
||||
@@ -1,35 +0,0 @@
|
||||
import { Box, Flex } from '@invoke-ai/ui-library';
|
||||
import { useStore } from '@nanostores/react';
|
||||
import { $workflowCategories } from 'app/store/nanostores/workflowCategories';
|
||||
import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent';
|
||||
import UploadWorkflowButton from 'features/workflowLibrary/components/UploadWorkflowButton';
|
||||
import type { RefObject } from 'react';
|
||||
import { memo } from 'react';
|
||||
|
||||
import { WorkflowList } from './WorkflowList';
|
||||
import { WorkflowSearch } from './WorkflowSearch';
|
||||
import { WorkflowSortControl } from './WorkflowSortControl';
|
||||
|
||||
export const WorkflowListMenuContent = memo(({ searchInputRef }: { searchInputRef: RefObject<HTMLInputElement> }) => {
|
||||
const workflowCategories = useStore($workflowCategories);
|
||||
|
||||
return (
|
||||
<Flex w="full" h="full" flexDir="column" gap={2}>
|
||||
<Flex alignItems="center" gap={2} w="full" justifyContent="space-between">
|
||||
<WorkflowSearch searchInputRef={searchInputRef} />
|
||||
<WorkflowSortControl />
|
||||
<UploadWorkflowButton />
|
||||
</Flex>
|
||||
|
||||
<Box position="relative" w="full" h="full">
|
||||
<ScrollableContent>
|
||||
{workflowCategories.map((category) => (
|
||||
<WorkflowList key={category} category={category} />
|
||||
))}
|
||||
</ScrollableContent>
|
||||
</Box>
|
||||
</Flex>
|
||||
);
|
||||
});
|
||||
|
||||
WorkflowListMenuContent.displayName = 'WorkflowListMenuContent';
|
||||
Reference in New Issue
Block a user