diff --git a/invokeai/frontend/web/src/app/App.tsx b/invokeai/frontend/web/src/app/App.tsx index f458b30458..d2f96b0746 100644 --- a/invokeai/frontend/web/src/app/App.tsx +++ b/invokeai/frontend/web/src/app/App.tsx @@ -21,11 +21,11 @@ import { setShouldFetchImages } from 'features/gallery/store/resultsSlice'; import { motion, AnimatePresence } from 'framer-motion'; import Loading from 'common/components/Loading/Loading'; import { - ApplicationFeature, disabledFeaturesChanged, disabledTabsChanged, } from 'features/system/store/systemSlice'; import { useIsApplicationReady } from 'features/system/hooks/useIsApplicationReady'; +import { ApplicationFeature } from './invokeai'; keepGUIAlive(); diff --git a/invokeai/frontend/web/src/app/invokeai.d.ts b/invokeai/frontend/web/src/app/invokeai.d.ts index f98ca73675..43b0fa1838 100644 --- a/invokeai/frontend/web/src/app/invokeai.d.ts +++ b/invokeai/frontend/web/src/app/invokeai.d.ts @@ -17,6 +17,19 @@ import { IRect } from 'konva/lib/types'; import { ImageMetadata, ImageType } from 'services/api'; import { AnyInvocation } from 'services/events/types'; +/** + * A disable-able application feature + */ +export declare type ApplicationFeature = + | 'faceRestore' + | 'upscaling' + | 'lightbox' + | 'modelManager' + | 'githubLink' + | 'discordLink' + | 'bugLink' + | 'localization'; + /** * TODO: * Once an image has been generated, if it is postprocessed again, diff --git a/invokeai/frontend/web/src/component.tsx b/invokeai/frontend/web/src/component.tsx index 03ea485588..f9ec0c91ad 100644 --- a/invokeai/frontend/web/src/component.tsx +++ b/invokeai/frontend/web/src/component.tsx @@ -20,7 +20,7 @@ import Loading from './common/components/Loading/Loading'; // Localization import './i18n'; 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 ThemeLocaleProvider = lazy(() => import('./app/ThemeLocaleProvider')); diff --git a/invokeai/frontend/web/src/features/system/store/systemSlice.ts b/invokeai/frontend/web/src/features/system/store/systemSlice.ts index 32868ddb4f..90214c653b 100644 --- a/invokeai/frontend/web/src/features/system/store/systemSlice.ts +++ b/invokeai/frontend/web/src/features/system/store/systemSlice.ts @@ -35,19 +35,6 @@ export interface Log { [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 CancelType = 'immediate' | 'scheduled'; @@ -114,7 +101,7 @@ export interface SystemState /** * Array of disabled features */ - disabledFeatures: ApplicationFeature[]; + disabledFeatures: InvokeAI.ApplicationFeature[]; /** * Whether or not the available models were received */ @@ -389,7 +376,7 @@ export const systemSlice = createSlice({ */ disabledFeaturesChanged: ( state, - action: PayloadAction + action: PayloadAction ) => { state.disabledFeatures = action.payload; },