Skip to content

A platform for community discussion. Free, open, simple.

DEV: adds chat-drawer-before-content plugin outlet (#28284)

Joffrey JAFFEUXf87c2e7aa721
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer.hbs
index e5529087c97..8db0d03db6f 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer.hbs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer.hbs
@@ -11,6 +11,14 @@
>
<div class="chat-drawer-container">
<div class="chat-drawer-resizer"></div>
+
+ <PluginOutlet
+ @name="chat-drawer-before-content"
+ @outletArgs={{hash
+ currentRouteName=this.chatDrawerRouter.currentRouteName
+ }}
+ />
+
<this.chatDrawerRouter.component
@params={{this.chatDrawerRouter.params}}
@openURL={{this.openURL}}
diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-drawer-router.js b/plugins/chat/assets/javascripts/discourse/services/chat-drawer-router.js
index 083b8892747..b4a9f3f9788 100644
--- a/plugins/chat/assets/javascripts/discourse/services/chat-drawer-router.js
+++ b/plugins/chat/assets/javascripts/discourse/services/chat-drawer-router.js
@@ -160,6 +160,7 @@ export default class ChatDrawerRouter extends Service {
@tracked component = null;
@tracked drawerRoute = null;
@tracked params = null;
+ @tracked currentRouteName = null;
routeNames = Object.keys(ROUTES);