DEV: adds chat-drawer-before-content plugin outlet (#28284)
This outlet is rendered before the content of the drawer. The `currentRouteName` is accessible in `outletArgs`. Example: ```gjs export default class Test extends Component { <template> {{#if (eq @outletArgs.currentRouteName "chat.browse")}} the browse page {{/if}} </template> } ```
This commit is contained in:
parent
aeaae9babc
commit
f87c2e7aa7
|
@ -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}}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue