Reorganises app file structure

This commit is contained in:
psychedelicious 2022-11-19 14:23:06 +11:00 committed by blessedcoolant
parent bc46c46835
commit 2ab868314f
140 changed files with 392 additions and 392 deletions

View File

@ -1,18 +1,18 @@
import ProgressBar from 'features/system/ProgressBar';
import SiteHeader from 'features/system/SiteHeader';
import Console from 'features/system/Console';
import ProgressBar from 'features/system/components/ProgressBar';
import SiteHeader from 'features/system/components/SiteHeader';
import Console from 'features/system/components/Console';
import { keepGUIAlive } from './utils';
import InvokeTabs from 'features/tabs/InvokeTabs';
import InvokeTabs from 'features/tabs/components/InvokeTabs';
import ImageUploader from 'common/components/ImageUploader';
import { RootState, useAppSelector } from 'app/store';
import FloatingGalleryButton from 'features/tabs/FloatingGalleryButton';
import FloatingOptionsPanelButtons from 'features/tabs/FloatingOptionsPanelButtons';
import FloatingGalleryButton from 'features/tabs/components/FloatingGalleryButton';
import FloatingOptionsPanelButtons from 'features/tabs/components/FloatingOptionsPanelButtons';
import { createSelector } from '@reduxjs/toolkit';
import { GalleryState } from 'features/gallery/gallerySlice';
import { OptionsState } from 'features/options/optionsSlice';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { SystemState } from 'features/system/systemSlice';
import { GalleryState } from 'features/gallery/store/gallerySlice';
import { OptionsState } from 'features/options/store/optionsSlice';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { SystemState } from 'features/system/store/systemSlice';
import _ from 'lodash';
import { Model } from './invokeai';
import useToastWatcher from 'features/system/hooks/useToastWatcher';

View File

@ -1,6 +1,6 @@
// TODO: use Enums?
import { InProgressImageType } from 'features/system/systemSlice';
import { InProgressImageType } from 'features/system/store/systemSlice';
// Valid samplers
export const SAMPLERS: Array<string> = [

View File

@ -12,8 +12,8 @@
* 'gfpgan'.
*/
import { Category as GalleryCategory } from 'features/gallery/gallerySlice';
import { InvokeTabName } from 'features/tabs/InvokeTabs';
import { Category as GalleryCategory } from 'features/gallery/store/gallerySlice';
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
import { IRect } from 'konva/lib/types';
/**

View File

@ -1,9 +1,9 @@
import { createSelector } from '@reduxjs/toolkit';
import _ from 'lodash';
import { RootState } from 'app/store';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { OptionsState } from 'features/options/optionsSlice';
import { SystemState } from 'features/system/systemSlice';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { OptionsState } from 'features/options/store/optionsSlice';
import { SystemState } from 'features/system/store/systemSlice';
import { validateSeedWeights } from 'common/util/seedWeightPairs';
import { initialCanvasImageSelector } from 'features/canvas/store/canvasSelectors';

View File

@ -1,6 +1,6 @@
import { createAction } from '@reduxjs/toolkit';
import { GalleryCategory } from 'features/gallery/gallerySlice';
import { InvokeTabName } from 'features/tabs/InvokeTabs';
import { GalleryCategory } from 'features/gallery/store/gallerySlice';
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
import * as InvokeAI from 'app/invokeai';

View File

@ -9,16 +9,16 @@ import {
GalleryCategory,
GalleryState,
removeImage,
} from 'features/gallery/gallerySlice';
import { OptionsState } from 'features/options/optionsSlice';
} from 'features/gallery/store/gallerySlice';
import { OptionsState } from 'features/options/store/optionsSlice';
import {
addLogEntry,
generationRequested,
modelChangeRequested,
setCurrentStatus,
setIsProcessing,
} from 'features/system/systemSlice';
import { InvokeTabName } from 'features/tabs/InvokeTabs';
} from 'features/system/store/systemSlice';
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
import * as InvokeAI from 'app/invokeai';
import { RootState } from 'app/store';

View File

@ -15,7 +15,7 @@ import {
errorOccurred,
setModelList,
setIsCancelable,
} from 'features/system/systemSlice';
} from 'features/system/store/systemSlice';
import {
addGalleryImages,
@ -24,20 +24,20 @@ import {
GalleryState,
removeImage,
setIntermediateImage,
} from 'features/gallery/gallerySlice';
} from 'features/gallery/store/gallerySlice';
import {
clearInitialImage,
setInitialImage,
setMaskPath,
} from 'features/options/optionsSlice';
} from 'features/options/store/optionsSlice';
import {
requestImages,
requestNewImages,
requestSystemConfig,
} from './actions';
import { addImageToStagingArea } from 'features/canvas/store/canvasSlice';
import { tabMap } from 'features/tabs/InvokeTabs';
import { tabMap } from 'features/tabs/components/InvokeTabs';
/**
* Returns an object containing listener callbacks for socketio events.

View File

@ -7,9 +7,9 @@ import storage from 'redux-persist/lib/storage'; // defaults to localStorage for
import { getPersistConfig } from 'redux-deep-persist';
import optionsReducer from 'features/options/optionsSlice';
import galleryReducer from 'features/gallery/gallerySlice';
import systemReducer from 'features/system/systemSlice';
import optionsReducer from 'features/options/store/optionsSlice';
import galleryReducer from 'features/gallery/store/gallerySlice';
import systemReducer from 'features/system/store/systemSlice';
import canvasReducer from 'features/canvas/store/canvasSlice';
import { socketioMiddleware } from './socketio/middleware';

View File

@ -5,7 +5,7 @@ import {
PopoverTrigger,
Box,
} from '@chakra-ui/react';
import { SystemState } from 'features/system/systemSlice';
import { SystemState } from 'features/system/store/systemSlice';
import { useAppSelector } from 'app/store';
import { RootState } from 'app/store';
import { createSelector } from '@reduxjs/toolkit';

View File

@ -11,10 +11,10 @@ import { useToast } from '@chakra-ui/react';
// import { uploadImage } from 'app/socketio/actions';
import { UploadImagePayload } from 'app/invokeai';
import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { tabDict } from 'features/tabs/InvokeTabs';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { tabDict } from 'features/tabs/components/InvokeTabs';
import ImageUploadOverlay from './ImageUploadOverlay';
import { uploadImage } from 'features/gallery/util/uploadImage';
import { uploadImage } from 'features/gallery/store/thunks/uploadImage';
type ImageUploaderProps = {
children: ReactNode;

View File

@ -1,10 +1,10 @@
import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants';
import { OptionsState } from 'features/options/optionsSlice';
import { SystemState } from 'features/system/systemSlice';
import { OptionsState } from 'features/options/store/optionsSlice';
import { SystemState } from 'features/system/store/systemSlice';
import { stringToSeedWeightsArray } from './seedWeightPairs';
import randomInt from './randomInt';
import { InvokeTabName } from 'features/tabs/InvokeTabs';
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
import {
CanvasState,
isCanvasMaskLine,

View File

@ -1,6 +1,6 @@
import { createSelector } from '@reduxjs/toolkit';
import { RootState, useAppSelector } from 'app/store';
import { GalleryState } from 'features/gallery/gallerySlice';
import { GalleryState } from 'features/gallery/store/gallerySlice';
import { ImageConfig } from 'konva/lib/shapes/Image';
import _ from 'lodash';
import { useEffect, useState } from 'react';

View File

@ -1,7 +1,7 @@
import { Spinner } from '@chakra-ui/react';
import { useLayoutEffect, useRef } from 'react';
import { useAppDispatch, useAppSelector } from 'app/store';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import {
resizeAndScaleCanvas,
resizeCanvas,

View File

@ -3,7 +3,7 @@ import { useHotkeys } from 'react-hotkeys-hook';
import { FaRedo } from 'react-icons/fa';
import { useAppDispatch, useAppSelector } from 'app/store';
import IAIIconButton from 'common/components/IAIIconButton';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
import _ from 'lodash';

View File

@ -32,7 +32,7 @@ import {
} from 'features/canvas/store/canvasSelectors';
import { useHotkeys } from 'react-hotkeys-hook';
import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider';
import { systemSelector } from 'features/system/systemSelectors';
import { systemSelector } from 'features/system/store/systemSelectors';
export const selector = createSelector(
[canvasSelector, isStagingSelector, systemSelector],

View File

@ -6,7 +6,7 @@ import IAIIconButton from 'common/components/IAIIconButton';
import { canvasSelector } from 'features/canvas/store/canvasSelectors';
import _ from 'lodash';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { undo } from 'features/canvas/store/canvasSlice';
const canvasUndoSelector = createSelector(

View File

@ -1,7 +1,7 @@
import { createSelector } from '@reduxjs/toolkit';
import _ from 'lodash';
import { useHotkeys } from 'react-hotkeys-hook';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import {
setShouldShowBoundingBox,
setTool,

View File

@ -1,6 +1,6 @@
import { createSelector } from '@reduxjs/toolkit';
import { useAppDispatch, useAppSelector } from 'app/store';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import Konva from 'konva';
import { KonvaEventObject } from 'konva/lib/Node';
import _ from 'lodash';

View File

@ -1,6 +1,6 @@
import { createSelector } from '@reduxjs/toolkit';
import { useAppDispatch, useAppSelector } from 'app/store';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import Konva from 'konva';
import { KonvaEventObject } from 'konva/lib/Node';
import _ from 'lodash';

View File

@ -1,6 +1,6 @@
import { createSelector } from '@reduxjs/toolkit';
import { useAppDispatch, useAppSelector } from 'app/store';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import Konva from 'konva';
import { Vector2d } from 'konva/lib/types';
import _ from 'lodash';

View File

@ -1,6 +1,6 @@
import { createSelector } from '@reduxjs/toolkit';
import { useAppDispatch, useAppSelector } from 'app/store';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import Konva from 'konva';
import _ from 'lodash';
import { MutableRefObject, useCallback } from 'react';

View File

@ -6,8 +6,8 @@ import layerToDataURL from '../../util/layerToDataURL';
import downloadFile from '../../util/downloadFile';
import copyImage from '../../util/copyImage';
import { getCanvasBaseLayer } from '../../util/konvaInstanceProvider';
import { addToast } from 'features/system/systemSlice';
import { addImage } from 'features/gallery/gallerySlice';
import { addToast } from 'features/system/store/systemSlice';
import { addImage } from 'features/gallery/store/gallerySlice';
import { setMergedCanvas } from '../canvasSlice';
type MergeAndUploadCanvasConfig = {

View File

@ -12,14 +12,14 @@ import {
setPrompt,
setSeed,
setShouldShowImageDetails,
} from 'features/options/optionsSlice';
} from 'features/options/store/optionsSlice';
import DeleteImageModal from './DeleteImageModal';
import { SystemState } from 'features/system/systemSlice';
import { SystemState } from 'features/system/store/systemSlice';
import IAIButton from 'common/components/IAIButton';
import { runESRGAN, runFacetool } from 'app/socketio/actions';
import IAIIconButton from 'common/components/IAIIconButton';
import UpscaleOptions from 'features/options/AdvancedOptions/Upscale/UpscaleOptions';
import FaceRestoreOptions from 'features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions';
import UpscaleOptions from 'features/options/components/AdvancedOptions/Upscale/UpscaleOptions';
import FaceRestoreOptions from 'features/options/components/AdvancedOptions/FaceRestore/FaceRestoreOptions';
import { useHotkeys } from 'react-hotkeys-hook';
import { ButtonGroup, Link, useToast } from '@chakra-ui/react';
import {
@ -39,8 +39,8 @@ import {
setDoesCanvasNeedScaling,
setInitialCanvasImage,
} from 'features/canvas/store/canvasSlice';
import { GalleryState } from './gallerySlice';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { GalleryState } from 'features/gallery/store/gallerySlice';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import IAIPopover from 'common/components/IAIPopover';
const systemSelector = createSelector(

View File

@ -1,4 +1,4 @@
@use '../../styles/Mixins/' as *;
@use '../../../styles/Mixins/' as *;
.current-image-area {
display: flex;

View File

@ -2,11 +2,11 @@ import { RootState, useAppSelector } from 'app/store';
import CurrentImageButtons from './CurrentImageButtons';
import { MdPhoto } from 'react-icons/md';
import CurrentImagePreview from './CurrentImagePreview';
import { GalleryState } from './gallerySlice';
import { OptionsState } from 'features/options/optionsSlice';
import { GalleryState } from 'features/gallery/store/gallerySlice';
import { OptionsState } from 'features/options/store/optionsSlice';
import _ from 'lodash';
import { createSelector } from '@reduxjs/toolkit';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
export const currentImageDisplaySelector = createSelector(
[

View File

@ -7,10 +7,10 @@ import {
GalleryState,
selectNextImage,
selectPrevImage,
} from './gallerySlice';
} from 'features/gallery/store/gallerySlice';
import { createSelector } from '@reduxjs/toolkit';
import _ from 'lodash';
import { OptionsState, setIsLightBoxOpen } from 'features/options/optionsSlice';
import { OptionsState, setIsLightBoxOpen } from 'features/options/store/optionsSlice';
import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer';
export const imagesSelector = createSelector(

View File

@ -25,7 +25,7 @@ import {
import { useAppDispatch, useAppSelector } from 'app/store';
import { deleteImage } from 'app/socketio/actions';
import { RootState } from 'app/store';
import { setShouldConfirmOnDelete, SystemState } from 'features/system/systemSlice';
import { setShouldConfirmOnDelete, SystemState } from 'features/system/store/systemSlice';
import * as InvokeAI from 'app/invokeai';
import { useHotkeys } from 'react-hotkeys-hook';
import _ from 'lodash';

View File

@ -7,7 +7,7 @@ import {
useToast,
} from '@chakra-ui/react';
import { useAppDispatch, useAppSelector } from 'app/store';
import { setCurrentImage } from './gallerySlice';
import { setCurrentImage } from 'features/gallery/store/gallerySlice';
import { FaCheck, FaTrashAlt } from 'react-icons/fa';
import DeleteImageModal from './DeleteImageModal';
import { memo, useState } from 'react';
@ -19,7 +19,7 @@ import {
setIsLightBoxOpen,
setPrompt,
setSeed,
} from 'features/options/optionsSlice';
} from 'features/options/store/optionsSlice';
import * as InvokeAI from 'app/invokeai';
import * as ContextMenu from '@radix-ui/react-context-menu';
import {
@ -28,7 +28,7 @@ import {
setDoesCanvasNeedScaling,
setInitialCanvasImage,
} from 'features/canvas/store/canvasSlice';
import { hoverableImageSelector } from './gallerySliceSelectors';
import { hoverableImageSelector } from 'features/gallery/store/gallerySliceSelectors';
import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider';
interface HoverableImageProps {

View File

@ -1,4 +1,4 @@
@use '../../styles/Mixins/' as *;
@use '../../../styles/Mixins/' as *;
.image-gallery-wrapper-enter {
transform: translateX(150%);

View File

@ -25,13 +25,13 @@ import {
setShouldAutoSwitchToNewImages,
setShouldHoldGalleryOpen,
setShouldPinGallery,
} from './gallerySlice';
} from 'features/gallery/store/gallerySlice';
import HoverableImage from './HoverableImage';
import { setShouldShowGallery } from 'features/gallery/gallerySlice';
import { setShouldShowGallery } from 'features/gallery/store/gallerySlice';
import { ButtonGroup, useToast } from '@chakra-ui/react';
import { CSSTransition } from 'react-transition-group';
import { Direction } from 're-resizable/lib/resizer';
import { imageGallerySelector } from './gallerySliceSelectors';
import { imageGallerySelector } from 'features/gallery/store/gallerySliceSelectors';
import { FaImage, FaUser, FaWrench } from 'react-icons/fa';
import IAIPopover from 'common/components/IAIPopover';
import IAISlider from 'common/components/IAISlider';

View File

@ -1,4 +1,4 @@
@use '../../../styles/Mixins/' as *;
@use '../../../../styles/Mixins/' as *;
.image-metadata-viewer {
position: absolute;

View File

@ -33,7 +33,7 @@ import {
setWidth,
setInitialImage,
setShouldShowImageDetails,
} from 'features/options/optionsSlice';
} from 'features/options/store/optionsSlice';
import promptToString from 'common/util/promptToString';
import { seedWeightsToString } from 'common/util/seedWeightPairs';
import { FaCopy } from 'react-icons/fa';

View File

@ -3,7 +3,7 @@ import type { PayloadAction } from '@reduxjs/toolkit';
import _, { clamp } from 'lodash';
import * as InvokeAI from 'app/invokeai';
import { IRect } from 'konva/lib/types';
import { InvokeTabName } from 'features/tabs/InvokeTabs';
import { InvokeTabName } from 'features/tabs/components/InvokeTabs';
export type GalleryCategory = 'user' | 'result';

View File

@ -1,8 +1,8 @@
import { createSelector } from '@reduxjs/toolkit';
import { RootState } from 'app/store';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { OptionsState } from 'features/options/optionsSlice';
import { SystemState } from 'features/system/systemSlice';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { OptionsState } from 'features/options/store/optionsSlice';
import { SystemState } from 'features/system/store/systemSlice';
import { GalleryState } from './gallerySlice';
import _ from 'lodash';

View File

@ -2,9 +2,9 @@ import { AnyAction, ThunkAction } from '@reduxjs/toolkit';
import { RootState } from 'app/store';
import * as InvokeAI from 'app/invokeai';
import { v4 as uuidv4 } from 'uuid';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { setInitialCanvasImage } from 'features/canvas/store/canvasSlice';
import { setInitialImage } from 'features/options/optionsSlice';
import { setInitialImage } from 'features/options/store/optionsSlice';
import { addImage } from '../gallerySlice';
type UploadImageConfig = {

View File

@ -1,4 +1,4 @@
@use '../../styles/Mixins/' as *;
@use '../../../styles/Mixins/' as *;
.lightbox-container {
width: 100%;

View File

@ -1,15 +1,15 @@
import { IconButton } from '@chakra-ui/react';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAIIconButton from 'common/components/IAIIconButton';
import CurrentImageButtons from 'features/gallery/CurrentImageButtons';
import { imagesSelector } from 'features/gallery/CurrentImagePreview';
import CurrentImageButtons from 'features/gallery/components/CurrentImageButtons';
import { imagesSelector } from 'features/gallery/components/CurrentImagePreview';
import {
selectNextImage,
selectPrevImage,
} from 'features/gallery/gallerySlice';
import ImageGallery from 'features/gallery/ImageGallery';
import ImageMetadataViewer from 'features/gallery/ImageMetaDataViewer/ImageMetadataViewer';
import { setIsLightBoxOpen } from 'features/options/optionsSlice';
} from 'features/gallery/store/gallerySlice';
import ImageGallery from 'features/gallery/components/ImageGallery';
import ImageMetadataViewer from 'features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer';
import { setIsLightBoxOpen } from 'features/options/store/optionsSlice';
import React, { useState } from 'react';
import { useHotkeys } from 'react-hotkeys-hook';
import { BiExit } from 'react-icons/bi';

View File

@ -1,4 +1,4 @@
@use '../../../styles/Mixins/' as *;
@use '../../../../styles/Mixins/' as *;
.advanced-settings {
display: grid;

View File

@ -6,7 +6,7 @@ import {
useAppSelector,
} from 'app/store';
import IAISwitch from 'common/components/IAISwitch';
import { setShouldRunFacetool } from 'features/options/optionsSlice';
import { setShouldRunFacetool } from 'features/options/store/optionsSlice';
export default function FaceRestoreHeader() {
const isGFPGANAvailable = useAppSelector(

View File

@ -9,11 +9,11 @@ import {
setCodeformerFidelity,
setFacetoolStrength,
setFacetoolType,
} from 'features/options/optionsSlice';
} from 'features/options/store/optionsSlice';
import { createSelector } from '@reduxjs/toolkit';
import { isEqual } from 'lodash';
import { SystemState } from 'features/system/systemSlice';
import { SystemState } from 'features/system/store/systemSlice';
import IAINumberInput from 'common/components/IAINumberInput';
import IAISelect from 'common/components/IAISelect';
import { FACETOOL_TYPES } from 'app/constants';

View File

@ -5,7 +5,7 @@ import {
useAppSelector,
} from 'app/store';
import IAISwitch from 'common/components/IAISwitch';
import { setShouldFitToWidthHeight } from 'features/options/optionsSlice';
import { setShouldFitToWidthHeight } from 'features/options/store/optionsSlice';
export default function ImageFit() {
const dispatch = useAppDispatch();

View File

@ -1,7 +1,7 @@
import React from 'react';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAISlider from 'common/components/IAISlider';
import { setImg2imgStrength } from 'features/options/optionsSlice';
import { setImg2imgStrength } from 'features/options/store/optionsSlice';
interface ImageToImageStrengthProps {
label?: string;

View File

@ -1,9 +1,9 @@
import React, { ChangeEvent } from 'react';
import { useAppDispatch, useAppSelector } from '../../../../app/store';
import { useAppDispatch, useAppSelector } from '../../../../../app/store';
import _ from 'lodash';
import { createSelector } from '@reduxjs/toolkit';
import IAISwitch from '../../../../common/components/IAISwitch';
import IAISlider from '../../../../common/components/IAISlider';
import IAISwitch from '../../../../../common/components/IAISwitch';
import IAISlider from '../../../../../common/components/IAISlider';
import { Flex } from '@chakra-ui/react';
import {
setInpaintReplace,

View File

@ -6,7 +6,7 @@ import {
useAppSelector,
} from 'app/store';
import IAISwitch from 'common/components/IAISwitch';
import { setHiresFix } from 'features/options/optionsSlice';
import { setHiresFix } from 'features/options/store/optionsSlice';
/**
* Hires Fix Toggle

View File

@ -6,7 +6,7 @@ import {
useAppSelector,
} from 'app/store';
import IAISwitch from 'common/components/IAISwitch';
import { setSeamless } from 'features/options/optionsSlice';
import { setSeamless } from 'features/options/store/optionsSlice';
/**
* Seamless tiling toggle

View File

@ -5,7 +5,7 @@ import {
useAppSelector,
} from 'app/store';
import IAINumberInput from 'common/components/IAINumberInput';
import { setPerlin } from 'features/options/optionsSlice';
import { setPerlin } from 'features/options/store/optionsSlice';
export default function Perlin() {
const dispatch = useAppDispatch();

View File

@ -6,7 +6,7 @@ import {
useAppSelector,
} from 'app/store';
import IAISwitch from 'common/components/IAISwitch';
import { setShouldRandomizeSeed } from 'features/options/optionsSlice';
import { setShouldRandomizeSeed } from 'features/options/store/optionsSlice';
export default function RandomizeSeed() {
const dispatch = useAppDispatch();

View File

@ -6,7 +6,7 @@ import {
useAppSelector,
} from 'app/store';
import IAINumberInput from 'common/components/IAINumberInput';
import { setSeed } from 'features/options/optionsSlice';
import { setSeed } from 'features/options/store/optionsSlice';
export default function Seed() {
const seed = useAppSelector((state: RootState) => state.options.seed);

View File

@ -3,7 +3,7 @@ import React from 'react';
import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import randomInt from 'common/util/randomInt';
import { setSeed } from 'features/options/optionsSlice';
import { setSeed } from 'features/options/store/optionsSlice';
export default function ShuffleSeed() {
const dispatch = useAppDispatch();

View File

@ -5,7 +5,7 @@ import {
useAppSelector,
} from 'app/store';
import IAINumberInput from 'common/components/IAINumberInput';
import { setThreshold } from 'features/options/optionsSlice';
import { setThreshold } from 'features/options/store/optionsSlice';
export default function Threshold() {
const dispatch = useAppDispatch();

View File

@ -6,7 +6,7 @@ import {
useAppSelector,
} from 'app/store';
import IAISwitch from 'common/components/IAISwitch';
import { setShouldRunESRGAN } from 'features/options/optionsSlice';
import { setShouldRunESRGAN } from 'features/options/store/optionsSlice';
export default function UpscaleHeader() {
const isESRGANAvailable = useAppSelector(

View File

@ -6,12 +6,12 @@ import {
setUpscalingStrength,
UpscalingLevel,
OptionsState,
} from 'features/options/optionsSlice';
} from 'features/options/store/optionsSlice';
import { UPSCALING_LEVELS } from 'app/constants';
import { createSelector } from '@reduxjs/toolkit';
import { isEqual } from 'lodash';
import { SystemState } from 'features/system/systemSlice';
import { SystemState } from 'features/system/store/systemSlice';
import { ChangeEvent } from 'react';
import IAINumberInput from 'common/components/IAINumberInput';
import IAISelect from 'common/components/IAISelect';

View File

@ -5,7 +5,7 @@ import {
useAppSelector,
} from 'app/store';
import IAISwitch from 'common/components/IAISwitch';
import { setShouldGenerateVariations } from 'features/options/optionsSlice';
import { setShouldGenerateVariations } from 'features/options/store/optionsSlice';
export default function GenerateVariations() {
const shouldGenerateVariations = useAppSelector(

View File

@ -6,7 +6,7 @@ import {
} from 'app/store';
import IAIInput from 'common/components/IAIInput';
import { validateSeedWeights } from 'common/util/seedWeightPairs';
import { setSeedWeights } from 'features/options/optionsSlice';
import { setSeedWeights } from 'features/options/store/optionsSlice';
export default function SeedWeights() {
const seedWeights = useAppSelector(

View File

@ -5,7 +5,7 @@ import {
useAppSelector,
} from 'app/store';
import IAINumberInput from 'common/components/IAINumberInput';
import { setVariationAmount } from 'features/options/optionsSlice';
import { setVariationAmount } from 'features/options/store/optionsSlice';
export default function VariationAmount() {
const variationAmount = useAppSelector(

View File

@ -1,7 +1,7 @@
import React, { ChangeEvent } from 'react';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAICheckbox from 'common/components/IAICheckbox';
import { setShowAdvancedOptions } from 'features/options/optionsSlice';
import { setShowAdvancedOptions } from 'features/options/store/optionsSlice';
export default function MainAdvancedOptionsCheckbox() {
const showAdvancedOptions = useAppSelector(

View File

@ -1,7 +1,7 @@
import React from 'react';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAINumberInput from 'common/components/IAINumberInput';
import { setCfgScale } from 'features/options/optionsSlice';
import { setCfgScale } from 'features/options/store/optionsSlice';
import { inputWidth } from './MainOptions';
export default function MainCFGScale() {

View File

@ -2,8 +2,8 @@ import React, { ChangeEvent } from 'react';
import { HEIGHTS } from 'app/constants';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAISelect from 'common/components/IAISelect';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { setHeight } from 'features/options/optionsSlice';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { setHeight } from 'features/options/store/optionsSlice';
export default function MainHeight() {
const height = useAppSelector((state: RootState) => state.options.height);

View File

@ -3,8 +3,8 @@ import _ from 'lodash';
import React from 'react';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAINumberInput from 'common/components/IAINumberInput';
import { mayGenerateMultipleImagesSelector } from 'features/options/optionsSelectors';
import { OptionsState, setIterations } from 'features/options/optionsSlice';
import { mayGenerateMultipleImagesSelector } from 'features/options/store/optionsSelectors';
import { OptionsState, setIterations } from 'features/options/store/optionsSlice';
import { inputWidth } from './MainOptions';
const mainIterationsSelector = createSelector(

View File

@ -1,4 +1,4 @@
@use '../../../styles/Mixins/' as *;
@use '../../../../styles/Mixins/' as *;
.main-options {
display: grid;

View File

@ -2,7 +2,7 @@ import React, { ChangeEvent } from 'react';
import { SAMPLERS } from 'app/constants';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAISelect from 'common/components/IAISelect';
import { setSampler } from 'features/options/optionsSlice';
import { setSampler } from 'features/options/store/optionsSlice';
export default function MainSampler() {
const sampler = useAppSelector((state: RootState) => state.options.sampler);

View File

@ -1,7 +1,7 @@
import React from 'react';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAINumberInput from 'common/components/IAINumberInput';
import { setSteps } from 'features/options/optionsSlice';
import { setSteps } from 'features/options/store/optionsSlice';
import { inputWidth } from './MainOptions';
export default function MainSteps() {

View File

@ -2,8 +2,8 @@ import React, { ChangeEvent } from 'react';
import { WIDTHS } from 'app/constants';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAISelect from 'common/components/IAISelect';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { setWidth } from 'features/options/optionsSlice';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { setWidth } from 'features/options/store/optionsSlice';
export default function MainWidth() {
const width = useAppSelector((state: RootState) => state.options.width);

View File

@ -1,6 +1,6 @@
import { Accordion, ExpandedIndex } from '@chakra-ui/react';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import { setOpenAccordions } from 'features/system/systemSlice';
import { setOpenAccordions } from 'features/system/store/systemSlice';
import InvokeAccordionItem, {
InvokeAccordionItemProps,
} from './AccordionItems/InvokeAccordionItem';

View File

@ -6,7 +6,7 @@ import IAIIconButton, {
} from 'common/components/IAIIconButton';
import { useHotkeys } from 'react-hotkeys-hook';
import { createSelector } from '@reduxjs/toolkit';
import { SystemState } from 'features/system/systemSlice';
import { SystemState } from 'features/system/store/systemSlice';
import _ from 'lodash';
const cancelButtonSelector = createSelector(

View File

@ -9,7 +9,7 @@ import IAIIconButton, {
IAIIconButtonProps,
} from 'common/components/IAIIconButton';
import IAIPopover from 'common/components/IAIPopover';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
interface InvokeButton
extends Omit<IAIButtonProps | IAIIconButtonProps, 'aria-label'> {

View File

@ -2,7 +2,7 @@ import { createSelector } from '@reduxjs/toolkit';
import { FaRecycle } from 'react-icons/fa';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import IAIIconButton from 'common/components/IAIIconButton';
import { OptionsState, setShouldLoopback } from 'features/options/optionsSlice';
import { OptionsState, setShouldLoopback } from 'features/options/store/optionsSlice';
const loopbackSelector = createSelector(
(state: RootState) => state.options,

View File

@ -1,4 +1,4 @@
@use '../../../styles/Mixins/' as *;
@use '../../../../styles/Mixins/' as *;
.process-buttons {
display: flex;

View File

@ -3,11 +3,11 @@ import { ChangeEvent, KeyboardEvent, useRef } from 'react';
import { RootState, useAppDispatch, useAppSelector } from 'app/store';
import { generateImage } from 'app/socketio/actions';
import { OptionsState, setPrompt } from 'features/options/optionsSlice';
import { OptionsState, setPrompt } from 'features/options/store/optionsSlice';
import { createSelector } from '@reduxjs/toolkit';
import _ from 'lodash';
import { useHotkeys } from 'react-hotkeys-hook';
import { activeTabNameSelector } from 'features/options/optionsSelectors';
import { activeTabNameSelector } from 'features/options/store/optionsSelectors';
import { readinessSelector } from 'app/selectors/readinessSelector';
const promptInputSelector = createSelector(

View File

@ -1,7 +1,7 @@
import { createSelector } from '@reduxjs/toolkit';
import _ from 'lodash';
import { RootState } from 'app/store';
import { tabMap } from 'features/tabs/InvokeTabs';
import { tabMap } from 'features/tabs/components/InvokeTabs';
import { OptionsState } from './optionsSlice';
export const activeTabNameSelector = createSelector(

View File

@ -4,7 +4,7 @@ import * as InvokeAI from 'app/invokeai';
import promptToString from 'common/util/promptToString';
import { seedWeightsToString } from 'common/util/seedWeightPairs';
import { FACETOOL_TYPES } from 'app/constants';
import { InvokeTabName, tabMap } from 'features/tabs/InvokeTabs';
import { InvokeTabName, tabMap } from 'features/tabs/components/InvokeTabs';
export type UpscalingLevel = 2 | 4;

View File

@ -1,7 +1,7 @@
import { IconButton, Tooltip } from '@chakra-ui/react';
import { useAppDispatch, useAppSelector } from 'app/store';
import { RootState } from 'app/store';
import { errorSeen, setShouldShowLogViewer, SystemState } from './systemSlice';
import { errorSeen, setShouldShowLogViewer, SystemState } from 'features/system/store/systemSlice';
import { useLayoutEffect, useRef, useState } from 'react';
import { FaAngleDoubleDown, FaCode, FaMinus } from 'react-icons/fa';
import { createSelector } from '@reduxjs/toolkit';

View File

@ -1,4 +1,4 @@
@use '../../../styles/Mixins/' as *;
@use '../../../../styles/Mixins/' as *;
.hotkeys-modal {
width: 36rem;

View File

@ -1,4 +1,4 @@
@use '../../styles/Mixins/' as *;
@use '../../../styles/Mixins/' as *;
.modal {
background-color: var(--background-color-secondary);

View File

@ -1,4 +1,4 @@
@use '../../styles/Mixins/' as *;
@use '../../../styles/Mixins/' as *;
.progress-bar {
background-color: var(--root-bg-color);

Some files were not shown because too many files have changed in this diff Show More