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
2022-12-28 13:11:12 +00:00

25 lines
713 B
Handlebars

{{#if @channel.currentUserMembership.following}}
<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}}