#1853 Add WI/Script link by entry automation id

This commit is contained in:
Cohee
2024-02-24 17:22:51 +02:00
parent 7b8ac8f4c4
commit 3441667336
10 changed files with 90 additions and 5 deletions

View File

@ -31,6 +31,7 @@ export class QuickReply {
/**@type {Boolean}*/ executeOnAi = false;
/**@type {Boolean}*/ executeOnChatChange = false;
/**@type {Boolean}*/ executeOnGroupMemberDraft = false;
/**@type {String}*/ automationId = '';
/**@type {Function}*/ onExecute;
/**@type {Function}*/ onDelete;
@ -359,6 +360,13 @@ export class QuickReply {
this.executeOnGroupMemberDraft = executeOnGroupMemberDraft.checked;
this.updateContext();
});
/**@type {HTMLInputElement}*/
const automationId = dom.querySelector('#qr--automationId');
automationId.value = this.automationId;
automationId.addEventListener('input', () => {
this.automationId = automationId.value;
this.updateContext();
});
/**@type {HTMLElement}*/
const executeErrors = dom.querySelector('#qr--modal-executeErrors');
@ -492,6 +500,7 @@ export class QuickReply {
executeOnAi: this.executeOnAi,
executeOnChatChange: this.executeOnChatChange,
executeOnGroupMemberDraft: this.executeOnGroupMemberDraft,
automationId: this.automationId,
};
}
}