diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopPanel/ClearFlowButton.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopPanel/ClearFlowButton.tsx index 3ea6c54c2c..9a675c7214 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopPanel/ClearFlowButton.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopPanel/ClearFlowButton.tsx @@ -1,13 +1,12 @@ import { ConfirmationAlertDialog, Flex, IconButton, Text, useDisclosure } from '@invoke-ai/ui-library'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; +import { nodeEditorReset } from 'features/nodes/store/nodesSlice'; +import { addToast } from 'features/system/store/systemSlice'; +import { makeToast } from 'features/system/util/makeToast'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { PiTrashSimpleFill } from 'react-icons/pi'; -import { addToast } from '../../../../../system/store/systemSlice'; -import { makeToast } from '../../../../../system/util/makeToast'; -import { nodeEditorReset } from '../../../../store/nodesSlice'; - const ClearFlowButton = () => { const dispatch = useAppDispatch(); const { t } = useTranslation(); diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopPanel/SaveWorkflowButton.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopPanel/SaveWorkflowButton.tsx index 2d0abf3af5..937c518aa4 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopPanel/SaveWorkflowButton.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/panels/TopPanel/SaveWorkflowButton.tsx @@ -1,13 +1,12 @@ import { IconButton } from '@invoke-ai/ui-library'; import { useAppSelector } from 'app/store/storeHooks'; +import { $builtWorkflow } from 'features/nodes/hooks/useWorkflowWatcher'; import { useSaveWorkflowAsDialog } from 'features/workflowLibrary/components/SaveWorkflowAsDialog/useSaveWorkflowAsDialog'; +import { isWorkflowWithID, useSaveLibraryWorkflow } from 'features/workflowLibrary/hooks/useSaveWorkflow'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { PiFloppyDiskBold } from 'react-icons/pi'; -import { isWorkflowWithID, useSaveLibraryWorkflow } from '../../../../../workflowLibrary/hooks/useSaveWorkflow'; -import { $builtWorkflow } from '../../../../hooks/useWorkflowWatcher'; - const SaveWorkflowButton = () => { const { t } = useTranslation(); const isTouched = useAppSelector((s) => s.workflow.isTouched); diff --git a/invokeai/frontend/web/src/features/workflowLibrary/components/SaveWorkflowAsDialog/SaveWorkflowAsDialog.tsx b/invokeai/frontend/web/src/features/workflowLibrary/components/SaveWorkflowAsDialog/SaveWorkflowAsDialog.tsx index 74a8916475..218a9d1d2d 100644 --- a/invokeai/frontend/web/src/features/workflowLibrary/components/SaveWorkflowAsDialog/SaveWorkflowAsDialog.tsx +++ b/invokeai/frontend/web/src/features/workflowLibrary/components/SaveWorkflowAsDialog/SaveWorkflowAsDialog.tsx @@ -13,14 +13,13 @@ import { Input, } from '@invoke-ai/ui-library'; import { useStore } from '@nanostores/react'; +import { $workflowCategories } from 'app/store/nanostores/workflowCategories'; import { useSaveWorkflowAsDialog } from 'features/workflowLibrary/components/SaveWorkflowAsDialog/useSaveWorkflowAsDialog'; +import { useSaveWorkflowAs } from 'features/workflowLibrary/hooks/useSaveWorkflowAs'; import { t } from 'i18next'; import type { ChangeEvent } from 'react'; import { useCallback, useRef } from 'react'; -import { $workflowCategories } from '../../../../app/store/nanostores/workflowCategories'; -import { useSaveWorkflowAs } from '../../hooks/useSaveWorkflowAs'; - export const SaveWorkflowAsDialog = () => { const { isOpen, onClose, workflowName, setWorkflowName, shouldSaveToProject, setShouldSaveToProject } = useSaveWorkflowAsDialog(); diff --git a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryMenu/SaveWorkflowMenuItem.tsx b/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryMenu/SaveWorkflowMenuItem.tsx index 3fc7cee257..6ff744bc3b 100644 --- a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryMenu/SaveWorkflowMenuItem.tsx +++ b/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryMenu/SaveWorkflowMenuItem.tsx @@ -1,13 +1,12 @@ import { MenuItem } from '@invoke-ai/ui-library'; +import { useAppSelector } from 'app/store/storeHooks'; +import { $builtWorkflow } from 'features/nodes/hooks/useWorkflowWatcher'; import { useSaveWorkflowAsDialog } from 'features/workflowLibrary/components/SaveWorkflowAsDialog/useSaveWorkflowAsDialog'; import { isWorkflowWithID, useSaveLibraryWorkflow } from 'features/workflowLibrary/hooks/useSaveWorkflow'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { PiFloppyDiskBold } from 'react-icons/pi'; -import { useAppSelector } from '../../../../app/store/storeHooks'; -import { $builtWorkflow } from '../../../nodes/hooks/useWorkflowWatcher'; - const SaveWorkflowMenuItem = () => { const { t } = useTranslation(); const { saveWorkflow } = useSaveLibraryWorkflow(); diff --git a/invokeai/frontend/web/src/features/workflowLibrary/hooks/useSaveWorkflowAs.ts b/invokeai/frontend/web/src/features/workflowLibrary/hooks/useSaveWorkflowAs.ts index 2bd7aabbe4..edf87e81ab 100644 --- a/invokeai/frontend/web/src/features/workflowLibrary/hooks/useSaveWorkflowAs.ts +++ b/invokeai/frontend/web/src/features/workflowLibrary/hooks/useSaveWorkflowAs.ts @@ -8,12 +8,11 @@ import { workflowNameChanged, workflowSaved, } from 'features/nodes/store/workflowSlice'; +import type { WorkflowCategory } from 'features/nodes/types/workflow'; import { useCallback, useRef } from 'react'; import { useTranslation } from 'react-i18next'; import { useCreateWorkflowMutation, workflowsApi } from 'services/api/endpoints/workflows'; -import type { WorkflowCategory } from '../../nodes/types/workflow'; - type SaveWorkflowAsArg = { name: string; category: WorkflowCategory;