DEV: Tweaks for drop-down implementation (#69)

- Remove unused 'toggleAiBotPanel' widget action

- Switch from appEvents to closure actions

- Convert widget definition to native class syntax, so that we can use `@action` decorator. (alternatively, we could have done `{ closePanel: this.hideAiBotPanel.bind(this) }` in `RenderGlimmer`
This commit is contained in:
David Taylor
2023-05-18 09:28:43 +01:00
committed by GitHub
parent deb34bb52f
commit 261fe13599
4 changed files with 19 additions and 26 deletions
@@ -8,7 +8,6 @@ import I18n from "I18n";
export default class AiBotHeaderPanel extends Component {
@service siteSettings;
@service composer;
@service appEvents;
@action
async composeMessageWithTargetBot(target) {
@@ -29,6 +28,7 @@ export default class AiBotHeaderPanel extends Component {
}
async #composeAiBotMessage(targetBot) {
composeAiBotMessage(targetBot, this.composer, this.appEvents);
this.args.closePanel();
composeAiBotMessage(targetBot, this.composer);
}
}