fix(ui): fix export of ApplicationFeature type

This commit is contained in:
psychedelicious 2023-04-26 10:19:06 +10:00
parent 65816049ba
commit 3c150b384c
4 changed files with 17 additions and 17 deletions

View File

@ -21,11 +21,11 @@ import { setShouldFetchImages } from 'features/gallery/store/resultsSlice';
import { motion, AnimatePresence } from 'framer-motion'; import { motion, AnimatePresence } from 'framer-motion';
import Loading from 'common/components/Loading/Loading'; import Loading from 'common/components/Loading/Loading';
import { import {
ApplicationFeature,
disabledFeaturesChanged, disabledFeaturesChanged,
disabledTabsChanged, disabledTabsChanged,
} from 'features/system/store/systemSlice'; } from 'features/system/store/systemSlice';
import { useIsApplicationReady } from 'features/system/hooks/useIsApplicationReady'; import { useIsApplicationReady } from 'features/system/hooks/useIsApplicationReady';
import { ApplicationFeature } from './invokeai';
keepGUIAlive(); keepGUIAlive();

View File

@ -17,6 +17,19 @@ import { IRect } from 'konva/lib/types';
import { ImageMetadata, ImageType } from 'services/api'; import { ImageMetadata, ImageType } from 'services/api';
import { AnyInvocation } from 'services/events/types'; import { AnyInvocation } from 'services/events/types';
/**
* A disable-able application feature
*/
export declare type ApplicationFeature =
| 'faceRestore'
| 'upscaling'
| 'lightbox'
| 'modelManager'
| 'githubLink'
| 'discordLink'
| 'bugLink'
| 'localization';
/** /**
* TODO: * TODO:
* Once an image has been generated, if it is postprocessed again, * Once an image has been generated, if it is postprocessed again,

View File

@ -20,7 +20,7 @@ import Loading from './common/components/Loading/Loading';
// Localization // Localization
import './i18n'; import './i18n';
import { addMiddleware, resetMiddlewares } from 'redux-dynamic-middlewares'; import { addMiddleware, resetMiddlewares } from 'redux-dynamic-middlewares';
import { ApplicationFeature } from 'features/system/store/systemSlice'; import { ApplicationFeature } from 'app/invokeai';
const App = lazy(() => import('./app/App')); const App = lazy(() => import('./app/App'));
const ThemeLocaleProvider = lazy(() => import('./app/ThemeLocaleProvider')); const ThemeLocaleProvider = lazy(() => import('./app/ThemeLocaleProvider'));

View File

@ -35,19 +35,6 @@ export interface Log {
[index: number]: LogEntry; [index: number]: LogEntry;
} }
/**
* A disable-able application feature
*/
export type ApplicationFeature =
| 'faceRestore'
| 'upscaling'
| 'lightbox'
| 'modelManager'
| 'githubLink'
| 'discordLink'
| 'bugLink'
| 'localization';
export type InProgressImageType = 'none' | 'full-res' | 'latents'; export type InProgressImageType = 'none' | 'full-res' | 'latents';
export type CancelType = 'immediate' | 'scheduled'; export type CancelType = 'immediate' | 'scheduled';
@ -114,7 +101,7 @@ export interface SystemState
/** /**
* Array of disabled features * Array of disabled features
*/ */
disabledFeatures: ApplicationFeature[]; disabledFeatures: InvokeAI.ApplicationFeature[];
/** /**
* Whether or not the available models were received * Whether or not the available models were received
*/ */
@ -389,7 +376,7 @@ export const systemSlice = createSlice({
*/ */
disabledFeaturesChanged: ( disabledFeaturesChanged: (
state, state,
action: PayloadAction<ApplicationFeature[]> action: PayloadAction<InvokeAI.ApplicationFeature[]>
) => { ) => {
state.disabledFeatures = action.payload; state.disabledFeatures = action.payload;
}, },