-
{workflowNodes}
+
+
- } loading={workflowRunning} type="primary" onClick={handleRunClick}>
+ } loading={isRunning} type="primary" onClick={handleRunClick}>
{t("workflow.detail.orchestration.action.run")}
diff --git a/ui/src/stores/workflow/index.ts b/ui/src/stores/workflow/index.ts
index 57b22188..369347c1 100644
--- a/ui/src/stores/workflow/index.ts
+++ b/ui/src/stores/workflow/index.ts
@@ -25,8 +25,9 @@ export type WorkflowState = {
getWorkflowOuptutBeforeId: (id: string, type: string) => WorkflowNode[];
switchEnable(): void;
save(): void;
- init(id: string): void;
setBaseInfo: (name: string, description: string) => void;
+ init(id: string): void;
+ destroy(): void;
};
export const useWorkflowStore = create((set, get) => ({
@@ -214,4 +215,11 @@ export const useWorkflowStore = create((set, get) => ({
getWorkflowOuptutBeforeId: (id: string, type: string) => {
return getWorkflowOutputBeforeId(get().workflow.draft as WorkflowNode, id, type);
},
+
+ destroy: () => {
+ set({
+ workflow: {} as WorkflowModel,
+ initialized: false,
+ });
+ },
}));
diff --git a/ui/tailwind.config.js b/ui/tailwind.config.js
index 52dce060..8e4d86f0 100644
--- a/ui/tailwind.config.js
+++ b/ui/tailwind.config.js
@@ -14,34 +14,10 @@ module.exports = {
},
extend: {
colors: {
- border: "hsl(var(--border))",
- input: "hsl(var(--input))",
- ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
- foreground: "hsl(var(--primary-foreground))",
- },
- secondary: {
- DEFAULT: "hsl(var(--secondary))",
- foreground: "hsl(var(--secondary-foreground))",
- },
- destructive: {
- DEFAULT: "hsl(var(--destructive))",
- foreground: "hsl(var(--destructive-foreground))",
- },
- muted: {
- DEFAULT: "hsl(var(--muted))",
- foreground: "hsl(var(--muted-foreground))",
- },
- accent: {
- DEFAULT: "hsl(var(--accent))",
- foreground: "hsl(var(--accent-foreground))",
- },
- popover: {
- DEFAULT: "hsl(var(--popover))",
- foreground: "hsl(var(--popover-foreground))",
},
},
},