FIX: do not display add/remove participants if you can’t actually do it (#7125)
This commit is contained in:
parent
cd94ac9453
commit
c90267db52
|
@ -152,14 +152,17 @@ export default createWidget("private-message-map", {
|
|||
}
|
||||
|
||||
const result = [h(`div.participants${hideNamesClass}`, participants)];
|
||||
const controls = [];
|
||||
|
||||
const controls = [
|
||||
if (attrs.canRemoveAllowedUsers || attrs.canRemoveSelfId) {
|
||||
controls.push(
|
||||
this.attach("button", {
|
||||
action: "toggleEditing",
|
||||
label: "private_message_info.edit",
|
||||
className: "btn btn-default add-remove-participant-btn"
|
||||
})
|
||||
];
|
||||
);
|
||||
}
|
||||
|
||||
if (attrs.canInvite && this.state.isEditing) {
|
||||
controls.push(
|
||||
|
@ -171,7 +174,9 @@ export default createWidget("private-message-map", {
|
|||
);
|
||||
}
|
||||
|
||||
if (controls.length) {
|
||||
result.push(h("div.controls", controls));
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
|
|
@ -357,7 +357,10 @@ aside.quote {
|
|||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
margin-bottom: 0.5em;
|
||||
|
||||
& + .controls {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
&.hide-names .user {
|
||||
.username,
|
||||
|
|
Loading…
Reference in New Issue