Skip to content

Commit

Permalink
render created_by in UI if its present
Browse files Browse the repository at this point in the history
  • Loading branch information
Mary Hipp authored and psychedelicious committed Aug 24, 2023
1 parent e6fd1c3 commit 466a819
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MenuItem } from '@chakra-ui/react';
import { Flex, MenuItem, Text } from '@chakra-ui/react';
import { skipToken } from '@reduxjs/toolkit/dist/query';
import { useAppToaster } from 'app/components/Toaster';
import { useAppDispatch } from 'app/store/storeHooks';
Expand Down Expand Up @@ -228,6 +228,18 @@ const SingleSelectionMenuItems = (props: SingleSelectionMenuItemsProps) => {
>
{t('gallery.deleteImage')}
</MenuItem>
{metadata?.created_by && (
<Flex
padding="5px 10px"
// backgroundColor="gray.600"
// marginBottom="-5px"
marginTop="5px"
>
<Text fontSize="xs" fontWeight="bold">
Created by {metadata?.created_by}
</Text>
</Flex>
)}
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ const ImageMetadataActions = (props: Props) => {

return (
<>
{metadata.created_by && (
<ImageMetadataItem label="Created By" value={metadata.created_by} />
)}
{metadata.generation_mode && (
<ImageMetadataItem
label="Generation Mode"
Expand Down
13 changes: 9 additions & 4 deletions invokeai/frontend/web/src/services/api/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,11 @@ export type components = {
* @description The generation mode that output this image
*/
generation_mode: string;
/**
* Created By
* @description The name of the creator of the image
*/
created_by?: string;
/**
* Positive Prompt
* @description The positive prompt parameter
Expand Down Expand Up @@ -6320,17 +6325,17 @@ export type components = {
*/
ControlNetModelFormat: "checkpoint" | "diffusers";
/**
* StableDiffusionOnnxModelFormat
* StableDiffusion1ModelFormat
* @description An enumeration.
* @enum {string}
*/
StableDiffusionOnnxModelFormat: "olive" | "onnx";
StableDiffusion1ModelFormat: "checkpoint" | "diffusers";
/**
* StableDiffusion1ModelFormat
* StableDiffusionOnnxModelFormat
* @description An enumeration.
* @enum {string}
*/
StableDiffusion1ModelFormat: "checkpoint" | "diffusers";
StableDiffusionOnnxModelFormat: "olive" | "onnx";
/**
* StableDiffusionXLModelFormat
* @description An enumeration.
Expand Down

0 comments on commit 466a819

Please sign in to comment.