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/toggle-channel-membership-button.hbs

26 lines
698 B
Handlebars

{{#if this.channel.isFollowing}}
<DButton
@action={{action "onLeaveChannel"}}
@translatedLabel={{this.label}}
@translatedTitle={{this.options.leaveTitle}}
@class={{concat-class
"toggle-channel-membership-button -leave btn-flat"
this.options.leaveClass
}}
@icon={{this.options.leaveIcon}}
@disabled={{this.isLoading}}
/>
{{else}}
<DButton
@action={{action "onJoinChannel"}}
@translatedLabel={{this.label}}
@translatedTitle={{this.options.joinTitle}}
@class={{concat-class
"toggle-channel-membership-button -join"
this.options.joinClass
}}
@icon={{this.options.joinIcon}}
@disabled={{this.isLoading}}
/>
{{/if}}