Skip to content

Commit 15a0a71

Browse files
hipsterusernamepsychedelicious
authored andcommitted
fix circ dependency
1 parent 22cea0d commit 15a0a71

File tree

8 files changed

+14
-9
lines changed

8 files changed

+14
-9
lines changed

invokeai/frontend/web/src/features/gallery/components/ImageViewer/NoContentForViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
44
import { IAINoContentFallback } from 'common/components/IAIImageFallback';
55
import { InvokeLogoIcon } from 'common/components/InvokeLogoIcon';
66
import { LOADING_SYMBOL, useHasImages } from 'features/gallery/hooks/useHasImages';
7-
import { $installModelsTab } from 'features/modelManagerV2/subpanels/InstallModels';
7+
import { $installModelsTab } from 'features/modelManagerV2/store/installModelsStore';
88
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
99
import { selectIsLocal } from 'features/system/store/configSlice';
1010
import { selectActiveTab } from 'features/ui/store/uiSelectors';

invokeai/frontend/web/src/features/modelManagerV2/hooks/useStarterModelsToast.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Button, Text, useToast } from '@invoke-ai/ui-library';
22
import { useAppDispatch } from 'app/store/storeHooks';
3-
import { $installModelsTab } from 'features/modelManagerV2/subpanels/InstallModels';
3+
import { $installModelsTab } from 'features/modelManagerV2/store/installModelsStore';
44
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
55
import { setActiveTab } from 'features/ui/store/uiSlice';
66
import { useCallback, useEffect, useState } from 'react';
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { atom } from 'nanostores';
2+
3+
/**
4+
* Atom to manage the active tab index for the Install Models panel.
5+
* Moved to separate file to avoid circular dependencies.
6+
*/
7+
export const $installModelsTab = atom(0);

invokeai/frontend/web/src/features/modelManagerV2/subpanels/AddModelPanel/LaunchpadForm/LaunchpadForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Box, Button, Flex, Grid, Heading, Text } from '@invoke-ai/ui-library';
22
import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent';
33
import { flattenStarterModel, useBuildModelInstallArg } from 'features/modelManagerV2/hooks/useBuildModelsToInstall';
4-
import { $installModelsTab } from 'features/modelManagerV2/subpanels/InstallModels';
4+
import { $installModelsTab } from 'features/modelManagerV2/store/installModelsStore';
55
import { toast } from 'features/toast/toast';
66
import { flatMap, negate, uniqWith } from 'lodash-es';
77
import { memo, useCallback } from 'react';

invokeai/frontend/web/src/features/modelManagerV2/subpanels/InstallModels.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Box, Button, Flex, Heading, Tab, TabList, TabPanel, TabPanels, Tabs, Text } from '@invoke-ai/ui-library';
22
import { useStore } from '@nanostores/react';
33
import { StarterModelsForm } from 'features/modelManagerV2/subpanels/AddModelPanel/StarterModels/StarterModelsForm';
4-
import { atom } from 'nanostores';
4+
import { $installModelsTab } from 'features/modelManagerV2/store/installModelsStore';
55
import { memo, useCallback } from 'react';
66
import { useTranslation } from 'react-i18next';
77
import { PiInfoBold } from 'react-icons/pi';
@@ -12,8 +12,6 @@ import { LaunchpadForm } from './AddModelPanel/LaunchpadForm/LaunchpadForm';
1212
import { ModelInstallQueue } from './AddModelPanel/ModelInstallQueue/ModelInstallQueue';
1313
import { ScanModelsForm } from './AddModelPanel/ScanFolder/ScanFolderForm';
1414

15-
export const $installModelsTab = atom(0);
16-
1715
export const InstallModels = memo(() => {
1816
const { t } = useTranslation();
1917
const index = useStore($installModelsTab);

invokeai/frontend/web/src/features/parameters/components/ModelPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type { Group, PickerContextState } from 'common/components/Picker/Picker'
1818
import { buildGroup, getRegex, Picker, usePickerContext } from 'common/components/Picker/Picker';
1919
import { useDisclosure } from 'common/hooks/useBoolean';
2020
import { typedMemo } from 'common/util/typedMemo';
21-
import { $installModelsTab } from 'features/modelManagerV2/subpanels/InstallModels';
21+
import { $installModelsTab } from 'features/modelManagerV2/store/installModelsStore';
2222
import { BASE_COLOR_MAP } from 'features/modelManagerV2/subpanels/ModelManagerPanel/ModelBaseBadge';
2323
import ModelImage from 'features/modelManagerV2/subpanels/ModelManagerPanel/ModelImage';
2424
import { NavigateToModelManagerButton } from 'features/parameters/components/MainModel/NavigateToModelManagerButton';

invokeai/frontend/web/src/features/parameters/components/PostProcessing/PostProcessingPopover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from '@invoke-ai/ui-library';
1212
import { adHocPostProcessingRequested } from 'app/store/middleware/listenerMiddleware/listeners/addAdHocPostProcessingRequestedListener';
1313
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
14-
import { $installModelsTab } from 'features/modelManagerV2/subpanels/InstallModels';
14+
import { $installModelsTab } from 'features/modelManagerV2/store/installModelsStore';
1515
import ParamPostProcessingModel from 'features/parameters/components/PostProcessing/ParamPostProcessingModel';
1616
import { selectPostProcessingModel } from 'features/parameters/store/upscaleSlice';
1717
import { useIsQueueMutationInProgress } from 'features/queue/hooks/useIsQueueMutationInProgress';

invokeai/frontend/web/src/features/settingsAccordions/components/UpscaleSettingsAccordion/UpscaleWarning.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Button, Flex, ListItem, Text, UnorderedList } from '@invoke-ai/ui-library';
22
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
33
import { selectModel } from 'features/controlLayers/store/paramsSlice';
4-
import { $installModelsTab } from 'features/modelManagerV2/subpanels/InstallModels';
4+
import { $installModelsTab } from 'features/modelManagerV2/store/installModelsStore';
55
import { useIsTooLargeToUpscale } from 'features/parameters/hooks/useIsTooLargeToUpscale';
66
import {
77
selectTileControlNetModel,

0 commit comments

Comments
 (0)