chore(Communities): remove community context menu for non-admins
Normal members shouldn't be able to create channels, nor should "leave channel" be an option of the context menu provided inside of a community. This commit removes these.
This commit is contained in:
parent
6de717e0e4
commit
122b3b8ae9
|
@ -54,6 +54,7 @@ Rectangle {
|
|||
anchors.rightMargin: Style.current.bigPadding
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 8
|
||||
visible: chatsModel.communities.activeCommunity.admin
|
||||
|
||||
onClicked: {
|
||||
optionsBtn.state = "pressed"
|
||||
|
@ -85,16 +86,6 @@ Rectangle {
|
|||
onTriggered: openPopup(inviteFriendsToCommunityPopup, {communityId: chatsModel.communities.activeCommunity.id})
|
||||
}
|
||||
|
||||
Action {
|
||||
//% "Leave community"
|
||||
text: qsTrId("leave-community")
|
||||
icon.source: "../../img/delete.svg"
|
||||
icon.color: Style.current.red
|
||||
icon.width: 20
|
||||
icon.height: 20
|
||||
onTriggered: chatsModel.communities.leaveCurrentCommunity()
|
||||
}
|
||||
|
||||
onAboutToHide: {
|
||||
optionsBtn.state = "default"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue