This work will allow us to have an {{outlet}} chat.channel route and use it for threads as a sidepanel.
35 lines
1.1 KiB
Handlebars
35 lines
1.1 KiB
Handlebars
<LinkTo
|
|
@route="chat.channel"
|
|
@models={{@channel.routeModels}}
|
|
class={{concat-class
|
|
"chat-channel-row"
|
|
(if @channel.focused "focused")
|
|
(if @channel.currentUserMembership.muted "muted")
|
|
(if @options.leaveButton "can-leave")
|
|
(if (eq this.chat.activeChannel.id @channel.id) "active")
|
|
(if this.channelHasUnread "has-unread")
|
|
}}
|
|
tabindex="0"
|
|
data-chat-channel-id={{@channel.id}}
|
|
{{did-insert this.startTrackingStatus}}
|
|
{{will-destroy this.stopTrackingStatus}}
|
|
>
|
|
<ChatChannelTitle @channel={{@channel}} />
|
|
<ChatChannelMetadata @channel={{@channel}} @unreadIndicator={{true}} />
|
|
|
|
{{#if (and @options.leaveButton @channel.isFollowing this.site.desktopView)}}
|
|
<ToggleChannelMembershipButton
|
|
@channel={{@channel}}
|
|
@options={{hash
|
|
leaveClass="btn-flat chat-channel-leave-btn"
|
|
labelType="none"
|
|
leaveIcon="times"
|
|
leaveTitle=(if
|
|
@channel.isDirectMessageChannel
|
|
(i18n "chat.direct_messages.leave")
|
|
(i18n "chat.channel_settings.leave_channel")
|
|
)
|
|
}}
|
|
/>
|
|
{{/if}}
|
|
</LinkTo> |