mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore(ui): lint
This commit is contained in:
parent
182dc859a0
commit
a1a611f8cb
@ -1,13 +1,12 @@
|
|||||||
import { ConfirmationAlertDialog, Flex, IconButton, Text, useDisclosure } from '@invoke-ai/ui-library';
|
import { ConfirmationAlertDialog, Flex, IconButton, Text, useDisclosure } from '@invoke-ai/ui-library';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
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 { memo, useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { PiTrashSimpleFill } from 'react-icons/pi';
|
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 ClearFlowButton = () => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
import { IconButton } from '@invoke-ai/ui-library';
|
import { IconButton } from '@invoke-ai/ui-library';
|
||||||
import { useAppSelector } from 'app/store/storeHooks';
|
import { useAppSelector } from 'app/store/storeHooks';
|
||||||
|
import { $builtWorkflow } from 'features/nodes/hooks/useWorkflowWatcher';
|
||||||
import { useSaveWorkflowAsDialog } from 'features/workflowLibrary/components/SaveWorkflowAsDialog/useSaveWorkflowAsDialog';
|
import { useSaveWorkflowAsDialog } from 'features/workflowLibrary/components/SaveWorkflowAsDialog/useSaveWorkflowAsDialog';
|
||||||
|
import { isWorkflowWithID, useSaveLibraryWorkflow } from 'features/workflowLibrary/hooks/useSaveWorkflow';
|
||||||
import { memo, useCallback } from 'react';
|
import { memo, useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { PiFloppyDiskBold } from 'react-icons/pi';
|
import { PiFloppyDiskBold } from 'react-icons/pi';
|
||||||
|
|
||||||
import { isWorkflowWithID, useSaveLibraryWorkflow } from '../../../../../workflowLibrary/hooks/useSaveWorkflow';
|
|
||||||
import { $builtWorkflow } from '../../../../hooks/useWorkflowWatcher';
|
|
||||||
|
|
||||||
const SaveWorkflowButton = () => {
|
const SaveWorkflowButton = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const isTouched = useAppSelector((s) => s.workflow.isTouched);
|
const isTouched = useAppSelector((s) => s.workflow.isTouched);
|
||||||
|
@ -13,14 +13,13 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
} from '@invoke-ai/ui-library';
|
} from '@invoke-ai/ui-library';
|
||||||
import { useStore } from '@nanostores/react';
|
import { useStore } from '@nanostores/react';
|
||||||
|
import { $workflowCategories } from 'app/store/nanostores/workflowCategories';
|
||||||
import { useSaveWorkflowAsDialog } from 'features/workflowLibrary/components/SaveWorkflowAsDialog/useSaveWorkflowAsDialog';
|
import { useSaveWorkflowAsDialog } from 'features/workflowLibrary/components/SaveWorkflowAsDialog/useSaveWorkflowAsDialog';
|
||||||
|
import { useSaveWorkflowAs } from 'features/workflowLibrary/hooks/useSaveWorkflowAs';
|
||||||
import { t } from 'i18next';
|
import { t } from 'i18next';
|
||||||
import type { ChangeEvent } from 'react';
|
import type { ChangeEvent } from 'react';
|
||||||
import { useCallback, useRef } from 'react';
|
import { useCallback, useRef } from 'react';
|
||||||
|
|
||||||
import { $workflowCategories } from '../../../../app/store/nanostores/workflowCategories';
|
|
||||||
import { useSaveWorkflowAs } from '../../hooks/useSaveWorkflowAs';
|
|
||||||
|
|
||||||
export const SaveWorkflowAsDialog = () => {
|
export const SaveWorkflowAsDialog = () => {
|
||||||
const { isOpen, onClose, workflowName, setWorkflowName, shouldSaveToProject, setShouldSaveToProject } =
|
const { isOpen, onClose, workflowName, setWorkflowName, shouldSaveToProject, setShouldSaveToProject } =
|
||||||
useSaveWorkflowAsDialog();
|
useSaveWorkflowAsDialog();
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
import { MenuItem } from '@invoke-ai/ui-library';
|
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 { useSaveWorkflowAsDialog } from 'features/workflowLibrary/components/SaveWorkflowAsDialog/useSaveWorkflowAsDialog';
|
||||||
import { isWorkflowWithID, useSaveLibraryWorkflow } from 'features/workflowLibrary/hooks/useSaveWorkflow';
|
import { isWorkflowWithID, useSaveLibraryWorkflow } from 'features/workflowLibrary/hooks/useSaveWorkflow';
|
||||||
import { memo, useCallback } from 'react';
|
import { memo, useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { PiFloppyDiskBold } from 'react-icons/pi';
|
import { PiFloppyDiskBold } from 'react-icons/pi';
|
||||||
|
|
||||||
import { useAppSelector } from '../../../../app/store/storeHooks';
|
|
||||||
import { $builtWorkflow } from '../../../nodes/hooks/useWorkflowWatcher';
|
|
||||||
|
|
||||||
const SaveWorkflowMenuItem = () => {
|
const SaveWorkflowMenuItem = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { saveWorkflow } = useSaveLibraryWorkflow();
|
const { saveWorkflow } = useSaveLibraryWorkflow();
|
||||||
|
@ -8,12 +8,11 @@ import {
|
|||||||
workflowNameChanged,
|
workflowNameChanged,
|
||||||
workflowSaved,
|
workflowSaved,
|
||||||
} from 'features/nodes/store/workflowSlice';
|
} from 'features/nodes/store/workflowSlice';
|
||||||
|
import type { WorkflowCategory } from 'features/nodes/types/workflow';
|
||||||
import { useCallback, useRef } from 'react';
|
import { useCallback, useRef } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useCreateWorkflowMutation, workflowsApi } from 'services/api/endpoints/workflows';
|
import { useCreateWorkflowMutation, workflowsApi } from 'services/api/endpoints/workflows';
|
||||||
|
|
||||||
import type { WorkflowCategory } from '../../nodes/types/workflow';
|
|
||||||
|
|
||||||
type SaveWorkflowAsArg = {
|
type SaveWorkflowAsArg = {
|
||||||
name: string;
|
name: string;
|
||||||
category: WorkflowCategory;
|
category: WorkflowCategory;
|
||||||
|
Loading…
Reference in New Issue
Block a user