mirror of
https://github.com/hanzoai/forum.git
synced 2026-09-30 21:51:19 +00:00
These changes allow to load model when loading a screen of the drawer, the underlying idea is to avoid having to rely on the global `activeChannel`, this essentially makes each screen responsible for it's data. This change is also fixing a bug where clicking on a link routing to the same screen of the drawer you are already on, would display a blank drawer.
41 lines
1.2 KiB
Handlebars
41 lines
1.2 KiB
Handlebars
{{#if this.chatStateManager.isDrawerActive}}
|
|
{{bodyClass "chat-drawer-active"}}
|
|
{{/if}}
|
|
|
|
{{#if this.chatStateManager.isDrawerExpanded}}
|
|
{{bodyClass "chat-drawer-expanded"}}
|
|
{{/if}}
|
|
|
|
{{#if this.chatStateManager.isDrawerActive}}
|
|
<div
|
|
data-chat-channel-id={{this.chatDrawerRouter.model.channel.id}}
|
|
data-chat-thread-id={{this.chatDrawerRouter.model.channel.activeThread.id}}
|
|
class={{concat-class
|
|
"chat-drawer"
|
|
(if this.chatStateManager.isDrawerExpanded "is-expanded" "is-collapsed")
|
|
}}
|
|
{{chat/resizable-node ".chat-drawer-resizer" this.didResize}}
|
|
style={{this.drawerStyle}}
|
|
>
|
|
<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}}
|
|
@model={{this.chatDrawerRouter.model}}
|
|
@openURL={{this.openURL}}
|
|
@openInFullPage={{this.openInFullPage}}
|
|
@toggleExpand={{this.toggleExpand}}
|
|
@close={{this.close}}
|
|
@drawerActions={{this.drawerActions}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
{{/if}} |