Skip to content

Commit

Permalink
added delete channel button (#10438)
Browse files Browse the repository at this point in the history
[FIX] Button to delete rooms by the owners wasn't appearing
  • Loading branch information
ggazzo authored and rodrigok committed Apr 16, 2018
1 parent f6a08e6 commit c9c0d8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ <h3 title="{{name}}" class="rc-user-info__name">{{> icon block="rc-header__icon"
{{#if canLeaveRoom}}
<button class="rc-button rc-button--icon rc-button--outline rc-button--cancel js-leave">{{> icon icon='sign-out'}}{{_ 'Leave'}}</button>
{{/if}}
<!-- {{#if canDeleteRoom}}
<button class="rc-button rc-button-outline rc-button-cancel js-delete" title="{{_ 'Delete'}}">{{> icon icon='trash'}}{{_ 'Delete'}}</button>
{{/if}} -->
</div>
{{#if canDeleteRoom}}
<button class="rc-button rc-button-outline rc-button-cancel js-delete rc-button--cancel rc-button--stack" title="{{_ 'Delete'}}">{{> icon icon='trash'}}{{_ 'Delete'}}</button>
{{/if}}
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const common = {
});

const roomType = room && room.t;
return roomType && RocketChat.roomTypes.roomTypes[room.t].canBeDeleted(room);
return roomType && RocketChat.roomTypes.roomTypes[roomType].canBeDeleted(room);
},
canEditRoom() {
const { _id } = Template.instance().room;
Expand Down
9 changes: 8 additions & 1 deletion packages/rocketchat-theme/client/imports/forms/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
}

&--icon > svg {
margin: 0 5px;
margin: 0 5px 0 -5px;

.rtl & {
margin: 0 -5px 0 5px;
}

font-size: 20px;
fill: currentColor;
Expand Down Expand Up @@ -107,6 +111,9 @@
border-style: solid;
background: transparent;
}
&--stack {
width: 100%;
}

&.loading {
position: relative;
Expand Down

0 comments on commit c9c0d8d

Please sign in to comment.