A platform for community discussion. Free, open, simple.
DEV: outlet for thread actions (#41382)
Gabriel Grubba51d0a79ba838
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-thread.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-thread.gjsindex a6f89e279ff..1a545103209 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-thread.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-thread.gjs@@ -1,6 +1,8 @@import Component from "@glimmer/component";import { array } from "@ember/helper";import { service } from "@ember/service";+import PluginOutlet from "discourse/components/plugin-outlet";+import lazyHash from "discourse/helpers/lazy-hash";import { i18n } from "discourse-i18n";import Navbar from "discourse/plugins/chat/discourse/components/chat/navbar";import ChatThread from "discourse/plugins/chat/discourse/components/chat-thread";@@ -51,6 +53,14 @@ export default class ChatDrawerRoutesChannelThread extends Component {/><navbar.Title @title={{this.threadTitle}} @icon="discourse-threads" /><navbar.Actions as |a|>+ <PluginOutlet+ @name="chat-thread-navbar-actions"+ @outletArgs={{lazyHash+ context="drawer"+ }}+ /><a.ToggleDrawerButton /><a.FullPageButton /><a.CloseDrawerButton />diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/thread/header.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/thread/header.gjsindex bd523f0d477..297177f006b 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat/thread/header.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/chat/thread/header.gjs@@ -1,6 +1,8 @@import Component from "@glimmer/component";import { on } from "@ember/modifier";import { service } from "@ember/service";+import PluginOutlet from "discourse/components/plugin-outlet";+import lazyHash from "discourse/helpers/lazy-hash";import noop from "discourse/helpers/noop";import { and, or } from "discourse/truth-helpers";import dIcon from "discourse/ui-kit/helpers/d-icon";@@ -95,6 +97,14 @@ export default class ChatThreadHeader extends Component {class={{if this.openThreadTitleModal "clickable"}}/><navbar.Actions as |action|>+ <PluginOutlet+ @name="chat-thread-navbar-actions"+ @outletArgs={{lazyHash+ thread=@thread+ channel=this.channel+ context="full-page"+ }}+ />{{#if this.currentUser}}<action.ThreadTrackingDropdown @thread={{@thread}} /><action.ThreadSettingsButton @thread={{@thread}} />