Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit fc3be6f

Browse files
authored
DEV: Add ai-bot-header-icon plugin outlet (#1302)
1 parent ab67299 commit fc3be6f

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

assets/javascripts/discourse/components/ai-bot-header-icon.gjs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import Component from "@glimmer/component";
2+
import { hash } from "@ember/helper";
23
import { action } from "@ember/object";
34
import { service } from "@ember/service";
45
import DButton from "discourse/components/d-button";
6+
import PluginOutlet from "discourse/components/plugin-outlet";
57
import { defaultHomepage } from "discourse/lib/utilities";
68
import { i18n } from "discourse-i18n";
79
import { composeAiBotMessage } from "../lib/ai-bot-helper";
@@ -58,12 +60,17 @@ export default class AiBotHeaderIcon extends Component {
5860
<template>
5961
{{#if this.showHeaderButton}}
6062
<li>
61-
<DButton
62-
@action={{this.onClick}}
63-
@icon={{this.icon}}
64-
title={{i18n "discourse_ai.ai_bot.shortcut_title"}}
65-
class="ai-bot-button icon btn-flat"
66-
/>
63+
<PluginOutlet
64+
@name="ai-bot-header-icon"
65+
@outletArgs={{hash onClick=this.onClick icon=this.icon}}
66+
>
67+
<DButton
68+
@action={{this.onClick}}
69+
@icon={{this.icon}}
70+
title={{i18n "discourse_ai.ai_bot.shortcut_title"}}
71+
class="ai-bot-button icon btn-flat"
72+
/>
73+
</PluginOutlet>
6774
</li>
6875
{{/if}}
6976
</template>

0 commit comments

Comments
 (0)