mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
move created_by out of recall panel
This commit is contained in:
parent
300a4693ae
commit
aa2c404cab
@ -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" />
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user