Loading client/src/components/Workflow/Editor/Actions/stepActions.ts +19 −8 Original line number Diff line number Diff line Loading @@ -87,18 +87,24 @@ export class LazySetLabelAction extends LazyMutateStepAction<"label"> { run() { const markdown = this.stateStore.report.markdown ?? ""; const newMarkdown = replaceLabel(markdown, this.labelType, this.fromValue as string, this.toValue as string); if (markdown !== newMarkdown) { this.stateStore.report.markdown = newMarkdown; this.toast(this.fromValue ?? "", this.toValue ?? ""); } } undo() { super.undo(); const markdown = this.stateStore.report.markdown ?? ""; const newMarkdown = replaceLabel(markdown, this.labelType, this.toValue as string, this.fromValue as string); if (markdown !== newMarkdown) { this.stateStore.report.markdown = newMarkdown; this.toast(this.toValue ?? "", this.fromValue ?? ""); } } redo() { super.redo(); Loading Loading @@ -139,19 +145,24 @@ export class LazySetOutputLabelAction extends LazyMutateStepAction<"workflow_out run() { const markdown = this.stateStore.report.markdown ?? ""; const newMarkdown = replaceLabel(markdown, "output", this.fromLabel, this.toLabel); if (newMarkdown !== markdown) { this.stateStore.report.markdown = newMarkdown; this.toast(this.fromLabel ?? "", this.toLabel ?? ""); } } undo() { super.undo(); const markdown = this.stateStore.report.markdown ?? ""; const newMarkdown = replaceLabel(markdown, "output", this.toLabel, this.fromLabel); this.stateStore.report.markdown = newMarkdown; if (newMarkdown !== markdown) { this.stateStore.report.markdown = newMarkdown; this.toast(this.toLabel ?? "", this.fromLabel ?? ""); } } redo() { this.run(); Loading Loading
client/src/components/Workflow/Editor/Actions/stepActions.ts +19 −8 Original line number Diff line number Diff line Loading @@ -87,18 +87,24 @@ export class LazySetLabelAction extends LazyMutateStepAction<"label"> { run() { const markdown = this.stateStore.report.markdown ?? ""; const newMarkdown = replaceLabel(markdown, this.labelType, this.fromValue as string, this.toValue as string); if (markdown !== newMarkdown) { this.stateStore.report.markdown = newMarkdown; this.toast(this.fromValue ?? "", this.toValue ?? ""); } } undo() { super.undo(); const markdown = this.stateStore.report.markdown ?? ""; const newMarkdown = replaceLabel(markdown, this.labelType, this.toValue as string, this.fromValue as string); if (markdown !== newMarkdown) { this.stateStore.report.markdown = newMarkdown; this.toast(this.toValue ?? "", this.fromValue ?? ""); } } redo() { super.redo(); Loading Loading @@ -139,19 +145,24 @@ export class LazySetOutputLabelAction extends LazyMutateStepAction<"workflow_out run() { const markdown = this.stateStore.report.markdown ?? ""; const newMarkdown = replaceLabel(markdown, "output", this.fromLabel, this.toLabel); if (newMarkdown !== markdown) { this.stateStore.report.markdown = newMarkdown; this.toast(this.fromLabel ?? "", this.toLabel ?? ""); } } undo() { super.undo(); const markdown = this.stateStore.report.markdown ?? ""; const newMarkdown = replaceLabel(markdown, "output", this.toLabel, this.fromLabel); this.stateStore.report.markdown = newMarkdown; if (newMarkdown !== markdown) { this.stateStore.report.markdown = newMarkdown; this.toast(this.toLabel ?? "", this.fromLabel ?? ""); } } redo() { this.run(); Loading