From 417cca016cc28adcc7e678a51289f57354794573 Mon Sep 17 00:00:00 2001 From: Typer_Body Date: Fri, 5 Jun 2026 22:35:57 +0800 Subject: [PATCH] cold --- .../home/workflows/WorkflowDetailContent.tsx | 6 +++++- .../workflow-form/WorkflowFormComponent.tsx | 19 +++---------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/web/src/app/home/workflows/WorkflowDetailContent.tsx b/web/src/app/home/workflows/WorkflowDetailContent.tsx index 71813163..fb868101 100644 --- a/web/src/app/home/workflows/WorkflowDetailContent.tsx +++ b/web/src/app/home/workflows/WorkflowDetailContent.tsx @@ -186,7 +186,11 @@ export default function WorkflowDetailContent({ id }: { id: string }) { edges, variables: workflow?.variables || {}, settings: workflow?.settings || {}, - version: '1.0', + // Keep the exported version aligned with the (published) workflow version + // instead of a hard-coded placeholder. + version: workflow?.version ?? 1, + createdAt: workflow?.created_at, + updatedAt: workflow?.updated_at, exportedAt: new Date().toISOString(), }; diff --git a/web/src/app/home/workflows/components/workflow-form/WorkflowFormComponent.tsx b/web/src/app/home/workflows/components/workflow-form/WorkflowFormComponent.tsx index 9fc4e84f..893ed03e 100644 --- a/web/src/app/home/workflows/components/workflow-form/WorkflowFormComponent.tsx +++ b/web/src/app/home/workflows/components/workflow-form/WorkflowFormComponent.tsx @@ -4,7 +4,6 @@ import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Textarea } from '@/components/ui/textarea'; -import { Switch } from '@/components/ui/switch'; import { Workflow } from '@/app/infra/entities/api'; import { Card, @@ -42,7 +41,6 @@ export default function WorkflowFormComponent({ const [name, setName] = useState(workflow?.name || ''); const [description, setDescription] = useState(workflow?.description || ''); const [emoji, setEmoji] = useState(workflow?.emoji || '🔄'); - const [isEnabled, setIsEnabled] = useState(workflow?.is_enabled ?? true); const isSyncingFromProp = useRef(false); // Sync with workflow prop @@ -52,7 +50,6 @@ export default function WorkflowFormComponent({ setName(workflow.name || ''); setDescription(workflow.description || ''); setEmoji(workflow.emoji || '🔄'); - setIsEnabled(workflow.is_enabled ?? true); } }, [workflow?.uuid, workflow?.version]); @@ -68,10 +65,11 @@ export default function WorkflowFormComponent({ name, description, emoji, - is_enabled: isEnabled, + // Workflows are always enabled; the toggle was removed as redundant. + is_enabled: true, }); } - }, [name, description, emoji, isEnabled]); + }, [name, description, emoji]); if (!workflow) { return ( @@ -118,17 +116,6 @@ export default function WorkflowFormComponent({ rows={3} /> - - {/* Enabled toggle */} -
-
- -

- {t('workflows.enabledDesc')} -

-
- -