move created_by out of recall panel

This commit is contained in:
Mary Hipp 2024-03-18 15:52:43 -04:00 committed by psychedelicious
parent 300a4693ae
commit aa2c404cab
4 changed files with 8 additions and 6 deletions

View File

@ -19,7 +19,6 @@ const ImageMetadataActions = (props: Props) => {
return (
<>
<MetadataItem metadata={metadata} handlers={handlers.createdBy} />
<MetadataItem metadata={metadata} handlers={handlers.generationMode} />
<MetadataItem metadata={metadata} handlers={handlers.positivePrompt} direction="column" />
<MetadataItem metadata={metadata} handlers={handlers.negativePrompt} direction="column" />

View File

@ -1,4 +1,4 @@
import { ExternalLink, Flex, Tab, TabList, TabPanel, TabPanels, Tabs } from '@invoke-ai/ui-library';
import { ExternalLink, Flex, Tab, TabList, TabPanel, TabPanels, Tabs, Text } from '@invoke-ai/ui-library';
import { IAINoContentFallback } from 'common/components/IAIImageFallback';
import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent';
import { memo } from 'react';
@ -37,6 +37,13 @@ const ImageMetadataViewer = ({ image }: ImageMetadataViewerProps) => {
overflow="hidden"
>
<ExternalLink href={image.image_url} label={image.image_name} />
{metadata && metadata['created_by'] && typeof metadata['created_by'] === 'string' ? (
<Text>
{t('metadata.createdBy')}: {metadata['created_by']}
</Text>
) : (
<></>
)}
<Tabs variant="line" isLazy={true} display="flex" flexDir="column" w="full" h="full">
<TabList>

View File

@ -174,7 +174,6 @@ const buildHandlers: BuildMetadataHandlers = ({
export const handlers = {
// Misc
createdBy: buildHandlers({ getLabel: () => t('metadata.createdBy'), parser: parsers.createdBy }),
generationMode: buildHandlers({ getLabel: () => t('metadata.generationMode'), parser: parsers.generationMode }),
// Core parameters

View File

@ -108,8 +108,6 @@ const getProperty = <T = unknown>(
});
};
const parseCreatedBy: MetadataParseFunc<string> = (metadata) => getProperty(metadata, 'created_by', isString);
const parseGenerationMode: MetadataParseFunc<string> = (metadata) => getProperty(metadata, 'generation_mode', isString);
const parsePositivePrompt: MetadataParseFunc<ParameterPositivePrompt> = (metadata) =>
@ -391,7 +389,6 @@ const parseAllIPAdapters: MetadataParseFunc<IPAdapterConfigMetadata[]> = async (
};
export const parsers = {
createdBy: parseCreatedBy,
generationMode: parseGenerationMode,
positivePrompt: parsePositivePrompt,
negativePrompt: parseNegativePrompt,