Action button notification only includes name if given

This commit is contained in:
Joe Knapper 2026-06-30 13:03:00 +01:00
parent d2e19142df
commit 59618ccfbf

View file

@ -349,7 +349,13 @@ export default {
this.$emit("completed", response.data.output);
} else if (response.data.status == "cancelled") {
this.$emit("cancelled", response.data);
this.modalNotify(`The action '${this.submitLabel}' was cancelled.`);
let cancelMessage;
if (this.submitLabel != "") {
cancelMessage = ` "${this.submitLabel}" `;
} else {
cancelMessage = " ";
}
this.modalNotify(`The action ${cancelMessage} was cancelled.`);
} else if (response.data.status == "error") {
const err_msg = this.log?.[0]?.message ?? "Unknown error";
this.$emit("error", err_msg);