mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): do not append "(copy)" to workflow name when saving
This commit is contained in:
parent
61060f032a
commit
5b5a71d40c
@ -3,7 +3,6 @@ import { useAppDispatch } from 'app/store/storeHooks';
|
|||||||
import { useWorkflow } from 'features/nodes/hooks/useWorkflow';
|
import { useWorkflow } from 'features/nodes/hooks/useWorkflow';
|
||||||
import { workflowLoaded } from 'features/nodes/store/actions';
|
import { workflowLoaded } from 'features/nodes/store/actions';
|
||||||
import { zWorkflowV2 } from 'features/nodes/types/workflow';
|
import { zWorkflowV2 } from 'features/nodes/types/workflow';
|
||||||
import { getWorkflowCopyName } from 'features/workflowLibrary/util/getWorkflowCopyName';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import {
|
import {
|
||||||
@ -39,7 +38,6 @@ export const useSaveLibraryWorkflow: UseSaveLibraryWorkflow = () => {
|
|||||||
} else {
|
} else {
|
||||||
const data = await createWorkflow(workflow).unwrap();
|
const data = await createWorkflow(workflow).unwrap();
|
||||||
const createdWorkflow = zWorkflowV2.parse(data.workflow);
|
const createdWorkflow = zWorkflowV2.parse(data.workflow);
|
||||||
createdWorkflow.name = getWorkflowCopyName(createdWorkflow.name);
|
|
||||||
dispatch(workflowLoaded(createdWorkflow));
|
dispatch(workflowLoaded(createdWorkflow));
|
||||||
toaster({
|
toaster({
|
||||||
title: t('workflows.workflowSaved'),
|
title: t('workflows.workflowSaved'),
|
||||||
|
Loading…
Reference in New Issue
Block a user