Skip to content

Commit

Permalink
fix(ui): only show dependency warning on flow deletion when there are…
Browse files Browse the repository at this point in the history
… dependencies (#3942)
  • Loading branch information
MilosPaunovic authored Jun 6, 2024
1 parent 82806ce commit cd08cf9
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions ui/src/components/inputs/EditorView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -770,18 +770,20 @@
"</code></li>"
)
.join("\n");
warning =
"<div class=\"el-alert el-alert--warning is-light mt-3\" role=\"alert\">\n" +
"<div class=\"el-alert__content\">\n" +
"<p class=\"el-alert__description\">\n" +
t("dependencies delete flow") +
"<ul>\n" +
deps +
"</ul>\n" +
"</p>\n" +
"</div>\n" +
"</div>";
if(deps.length){
warning =
"<div class=\"el-alert el-alert--warning is-light mt-3\" role=\"alert\">\n" +
"<div class=\"el-alert__content\">\n" +
"<p class=\"el-alert__description\">\n" +
t("dependencies delete flow") +
"<ul>\n" +
deps +
"</ul>\n" +
"</p>\n" +
"</div>\n" +
"</div>";
}
}
return t("delete confirm", {name: metadata.id}) + warning;
Expand Down

0 comments on commit cd08cf9

Please sign in to comment.