From 5f4ce6fda36964b405117c0ec6243e6d506f11ac Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 24 Jul 2024 07:38:16 +1000 Subject: [PATCH] tidy(ui): organise postprocessing files --- .../components/ImageViewer/CurrentImageButtons.tsx | 4 ++-- .../ParamPostProcessingModel.tsx | 0 .../PostProcessingPopover.tsx} | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) rename invokeai/frontend/web/src/features/parameters/components/{Upscale => PostProcessing}/ParamPostProcessingModel.tsx (100%) rename invokeai/frontend/web/src/features/parameters/components/{Upscale/ParamUpscaleSettings.tsx => PostProcessing/PostProcessingPopover.tsx} (94%) diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImageButtons.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImageButtons.tsx index d500d692fe..c26a59dbb1 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImageButtons.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageViewer/CurrentImageButtons.tsx @@ -14,7 +14,7 @@ import { selectLastSelectedImage } from 'features/gallery/store/gallerySelectors import { selectGallerySlice } from 'features/gallery/store/gallerySlice'; import { parseAndRecallImageDimensions } from 'features/metadata/util/handlers'; import { $templates } from 'features/nodes/store/nodesSlice'; -import ParamUpscalePopover from 'features/parameters/components/Upscale/ParamUpscaleSettings'; +import { PostProcessingPopover } from 'features/parameters/components/PostProcessing/PostProcessingPopover'; import { useIsQueueMutationInProgress } from 'features/queue/hooks/useIsQueueMutationInProgress'; import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus'; import { selectSystemSlice } from 'features/system/store/systemSlice'; @@ -193,7 +193,7 @@ const CurrentImageButtons = () => { {isUpscalingEnabled && ( - {isUpscalingEnabled && } + {isUpscalingEnabled && } )} diff --git a/invokeai/frontend/web/src/features/parameters/components/Upscale/ParamPostProcessingModel.tsx b/invokeai/frontend/web/src/features/parameters/components/PostProcessing/ParamPostProcessingModel.tsx similarity index 100% rename from invokeai/frontend/web/src/features/parameters/components/Upscale/ParamPostProcessingModel.tsx rename to invokeai/frontend/web/src/features/parameters/components/PostProcessing/ParamPostProcessingModel.tsx diff --git a/invokeai/frontend/web/src/features/parameters/components/Upscale/ParamUpscaleSettings.tsx b/invokeai/frontend/web/src/features/parameters/components/PostProcessing/PostProcessingPopover.tsx similarity index 94% rename from invokeai/frontend/web/src/features/parameters/components/Upscale/ParamUpscaleSettings.tsx rename to invokeai/frontend/web/src/features/parameters/components/PostProcessing/PostProcessingPopover.tsx index 6f719388d3..35f44d282f 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Upscale/ParamUpscaleSettings.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/PostProcessing/PostProcessingPopover.tsx @@ -12,7 +12,7 @@ import { import { upscaleRequested } from 'app/store/middleware/listenerMiddleware/listeners/upscaleRequested'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { $installModelsTab } from 'features/modelManagerV2/subpanels/InstallModels'; -import ParamPostProcessingModel from 'features/parameters/components/Upscale/ParamPostProcessingModel'; +import ParamPostProcessingModel from 'features/parameters/components/PostProcessing/ParamPostProcessingModel'; import { useIsQueueMutationInProgress } from 'features/queue/hooks/useIsQueueMutationInProgress'; import { setActiveTab } from 'features/ui/store/uiSlice'; import { memo, useCallback } from 'react'; @@ -22,7 +22,7 @@ import type { ImageDTO } from 'services/api/types'; type Props = { imageDTO?: ImageDTO }; -const ParamUpscalePopover = (props: Props) => { +export const PostProcessingPopover = memo((props: Props) => { const { imageDTO } = props; const dispatch = useAppDispatch(); const { postProcessingModel } = useAppSelector((s) => s.upscale); @@ -61,9 +61,9 @@ const ParamUpscalePopover = (props: Props) => { ); -}; +}); -export default memo(ParamUpscalePopover); +PostProcessingPopover.displayName = 'PostProcessingPopover'; const MissingModelWarning = () => { const dispatch = useAppDispatch();