Show loading icon when saving the workflow (#1740)
This commit is contained in:
@@ -603,6 +603,7 @@ function FlowRenderer({
|
||||
<Panel position="top-center" className="h-20">
|
||||
<WorkflowHeader
|
||||
title={title}
|
||||
saving={saveWorkflowMutation.isPending}
|
||||
onTitleChange={(newTitle) => {
|
||||
setTitle(newTitle);
|
||||
setHasChanges(true);
|
||||
|
||||
@@ -25,6 +25,7 @@ type Props = {
|
||||
onParametersClick: () => void;
|
||||
onSave: () => void;
|
||||
onTitleChange: (title: string) => void;
|
||||
saving: boolean;
|
||||
};
|
||||
|
||||
function WorkflowHeader({
|
||||
@@ -33,6 +34,7 @@ function WorkflowHeader({
|
||||
onParametersClick,
|
||||
onSave,
|
||||
onTitleChange,
|
||||
saving,
|
||||
}: Props) {
|
||||
const { workflowPermanentId } = useParams();
|
||||
const { data: globalWorkflows } = useGlobalWorkflowsQuery();
|
||||
@@ -95,7 +97,11 @@ function WorkflowHeader({
|
||||
onSave();
|
||||
}}
|
||||
>
|
||||
<SaveIcon />
|
||||
{saving ? (
|
||||
<ReloadIcon className="size-6 animate-spin" />
|
||||
) : (
|
||||
<SaveIcon className="size-6" />
|
||||
)}
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Save</TooltipContent>
|
||||
|
||||
Reference in New Issue
Block a user