mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): restore removed type
This commit is contained in:
parent
e2114a1da5
commit
ed00afc64d
14
invokeai/frontend/web/src/app/invokeai.d.ts
vendored
14
invokeai/frontend/web/src/app/invokeai.d.ts
vendored
@ -124,6 +124,20 @@ export declare type Image = {
|
||||
category: GalleryCategory;
|
||||
isBase64?: boolean;
|
||||
dreamPrompt?: 'string';
|
||||
name?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* ResultImage
|
||||
*/
|
||||
export declare type ResultImage = {
|
||||
name: string;
|
||||
url: string;
|
||||
thumbnail: string;
|
||||
width: number;
|
||||
height: number;
|
||||
timestamp: number;
|
||||
metadata?: Metadata;
|
||||
};
|
||||
|
||||
// GalleryImages is an array of Image.
|
||||
|
@ -1,11 +1,8 @@
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { ProgressImage } from './events/types';
|
||||
import { createSession, invokeSession } from 'services/thunks/session';
|
||||
import { getImage, uploadImage } from './thunks/image';
|
||||
import * as InvokeAI from 'app/invokeai';
|
||||
import { addImage } from 'features/gallery/store/gallerySlice';
|
||||
|
||||
/**
|
||||
* Just temp until we work out better statuses
|
||||
|
@ -35,6 +35,7 @@ export const invokeMiddleware: Middleware =
|
||||
const uploadLocation = action.payload;
|
||||
console.log('uploadImage.fulfilled');
|
||||
|
||||
// TODO: actually get correct attributes here
|
||||
const newImage: InvokeAI.Image = {
|
||||
uuid: uuidv4(),
|
||||
category: 'user',
|
||||
@ -49,6 +50,7 @@ export const invokeMiddleware: Middleware =
|
||||
|
||||
const { activeTab } = getState().ui;
|
||||
const activeTabName = tabMap[activeTab];
|
||||
|
||||
if (activeTabName === 'unifiedCanvas') {
|
||||
dispatch(setInitialCanvasImage(newImage));
|
||||
} else if (activeTabName === 'img2img') {
|
||||
|
Loading…
Reference in New Issue
Block a user