mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-08 08:08:51 +01:00
Merge pull request #1651 from LenAnderson/qr-fix-addset
This commit is contained in:
commit
18fea7309a
@ -38,9 +38,10 @@ export class QuickReplyConfig {
|
|||||||
const qrl = new QuickReplySetLink();
|
const qrl = new QuickReplySetLink();
|
||||||
qrl.set = qrs;
|
qrl.set = qrs;
|
||||||
qrl.isVisible = isVisible;
|
qrl.isVisible = isVisible;
|
||||||
|
this.hookQuickReplyLink(qrl);
|
||||||
this.setList.push(qrl);
|
this.setList.push(qrl);
|
||||||
|
this.setListDom.append(qrl.renderSettings(this.setList.length - 1));
|
||||||
this.update();
|
this.update();
|
||||||
this.updateSetListDom();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
removeSet(qrs) {
|
removeSet(qrs) {
|
||||||
@ -59,12 +60,7 @@ export class QuickReplyConfig {
|
|||||||
/**@type {HTMLElement}*/
|
/**@type {HTMLElement}*/
|
||||||
this.setListDom = root.querySelector('.qr--setList');
|
this.setListDom = root.querySelector('.qr--setList');
|
||||||
root.querySelector('.qr--setListAdd').addEventListener('click', ()=>{
|
root.querySelector('.qr--setListAdd').addEventListener('click', ()=>{
|
||||||
const qrl = new QuickReplySetLink();
|
this.addSet(QuickReplySet.list[0]);
|
||||||
qrl.set = QuickReplySet.list[0];
|
|
||||||
this.hookQuickReplyLink(qrl);
|
|
||||||
this.setList.push(qrl);
|
|
||||||
this.setListDom.append(qrl.renderSettings(this.setList.length - 1));
|
|
||||||
this.update();
|
|
||||||
});
|
});
|
||||||
this.updateSetListDom();
|
this.updateSetListDom();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user