This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/plugins/chat/assets/javascripts/discourse/components/chat-channel-preview-card.hbs
2023-02-16 13:57:11 -03:00

23 lines
672 B
Handlebars

<div
class={{concat-class
"chat-channel-preview-card"
(unless this.hasDescription "-no-description")
(unless (and this.isOpen this.canJoin) "-no-button")
}}
>
<ChatChannelTitle @channel={{this.channel}} />
{{#if this.hasDescription}}
<p class="chat-channel-preview-card__description">
{{this.channel.description}}
</p>
{{/if}}
{{#if (and this.isOpen this.canJoin)}}
<ToggleChannelMembershipButton
@channel={{this.channel}}
@options={{hash joinClass="btn-primary"}}
/>
{{/if}}
<LinkTo @route="chat.browse" class="chat-channel-preview-card__browse-all">
{{i18n "chat.browse_all_channels"}}
</LinkTo>
</div>