mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy(ui): clean up unused code 4
variables, types and schemas
This commit is contained in:
@ -2,11 +2,11 @@ import { Flex, Heading } from '@invoke-ai/ui-library';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import { memo } from 'react';
|
||||
|
||||
export type StickyScrollableHeadingProps = {
|
||||
type StickyScrollableHeadingProps = {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export const StickyScrollableHeading = memo((props: StickyScrollableHeadingProps) => {
|
||||
const StickyScrollableHeading = memo((props: StickyScrollableHeadingProps) => {
|
||||
return (
|
||||
<Flex ps={2} pb={4} position="sticky" zIndex={1} top={0} bg="base.800">
|
||||
<Heading size="sm">{props.title}</Heading>
|
||||
@ -16,9 +16,9 @@ export const StickyScrollableHeading = memo((props: StickyScrollableHeadingProps
|
||||
|
||||
StickyScrollableHeading.displayName = 'StickyScrollableHeading';
|
||||
|
||||
export type StickyScrollableContentProps = PropsWithChildren;
|
||||
type StickyScrollableContentProps = PropsWithChildren;
|
||||
|
||||
export const StickyScrollableContent = memo((props: StickyScrollableContentProps) => {
|
||||
const StickyScrollableContent = memo((props: StickyScrollableContentProps) => {
|
||||
return (
|
||||
<Flex p={4} borderRadius="base" bg="base.750" flexDir="column" gap={4}>
|
||||
{props.children}
|
||||
|
@ -14,7 +14,7 @@ const baseDimensionConfig: NumericalParameterConfig = {
|
||||
coarseStep: 64,
|
||||
};
|
||||
|
||||
export const initialConfigState: AppConfig = {
|
||||
const initialConfigState: AppConfig = {
|
||||
shouldUpdateImagesOnConnect: false,
|
||||
shouldFetchMetadataFromApi: false,
|
||||
disabledTabs: [],
|
||||
|
@ -24,7 +24,7 @@ import {
|
||||
|
||||
import type { Language, SystemState } from './types';
|
||||
|
||||
export const initialSystemState: SystemState = {
|
||||
const initialSystemState: SystemState = {
|
||||
_version: 1,
|
||||
isConnected: false,
|
||||
shouldConfirmOnDelete: true,
|
||||
@ -199,7 +199,7 @@ const isAnyServerError = isAnyOf(socketInvocationError, socketSessionRetrievalEr
|
||||
export const selectSystemSlice = (state: RootState) => state.system;
|
||||
|
||||
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
||||
export const migrateSystemState = (state: any): any => {
|
||||
const migrateSystemState = (state: any): any => {
|
||||
if (!('_version' in state)) {
|
||||
state._version = 1;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ export type DenoiseProgress = {
|
||||
percentage: number;
|
||||
};
|
||||
|
||||
export const zLanguage = z.enum([
|
||||
const zLanguage = z.enum([
|
||||
'ar',
|
||||
'az',
|
||||
'de',
|
||||
@ -58,11 +58,3 @@ export interface SystemState {
|
||||
status: SystemStatus;
|
||||
shouldEnableInformationalPopovers: boolean;
|
||||
}
|
||||
|
||||
export const STATUS_TRANSLATION_KEYS: Record<SystemStatus, string> = {
|
||||
CONNECTED: 'common.statusConnected',
|
||||
DISCONNECTED: 'common.statusDisconnected',
|
||||
PROCESSING: 'common.statusProcessing',
|
||||
ERROR: 'common.statusError',
|
||||
LOADING_MODEL: 'common.statusLoadingModel',
|
||||
};
|
||||
|
Reference in New Issue
Block a user