diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityMembersPopup.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityMembersPopup.qml index ef8c0790a4..2a0b67a535 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityMembersPopup.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityMembersPopup.qml @@ -155,9 +155,12 @@ ModalPopup { icon.height: 16 //% "Roles" text: qsTrId("roles") + enabled: chatsModel.communities.activeCommunity.admin onTriggered: console.log("TODO") } - Separator {} + Separator { + visible: chatsModel.communities.activeCommunity.admin + } Action { icon.source: "../../../img/communities/menu/kick.svg" icon.width: 16 @@ -165,6 +168,7 @@ ModalPopup { icon.color: Style.current.red //% "Kick" text: qsTrId("kick") + enabled: chatsModel.communities.activeCommunity.admin onTriggered: chatsModel.communities.removeUserFromCommunity(model.pubKey) } Action { @@ -174,9 +178,12 @@ ModalPopup { icon.color: Style.current.red //% "Ban" text: qsTrId("ban") + enabled: chatsModel.communities.activeCommunity.admin onTriggered: console.log("TODO") } - Separator {} + Separator { + visible: chatsModel.communities.activeCommunity.admin + } Action { icon.source: "../../../img/communities/menu/transfer-ownership.svg" icon.width: 16 @@ -184,6 +191,7 @@ ModalPopup { icon.color: Style.current.red //% "Transfer ownership" text: qsTrId("transfer-ownership") + enabled: chatsModel.communities.activeCommunity.admin onTriggered: console.log("TODO") } } diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupMembersList.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupMembersList.qml index 0e48ea42f5..27188f02ad 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupMembersList.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupMembersList.qml @@ -152,6 +152,7 @@ Item { /* } */ Separator { height: 10 + visible: chatsModel.communities.activeCommunity.admin } Action { property string type: "danger" @@ -161,6 +162,7 @@ Item { icon.color: Style.current.red //% "Kick" text: qsTrId("kick") + enabled: chatsModel.communities.activeCommunity.admin onTriggered: chatsModel.communities.removeUserFromCommunity(model.pubKey) } Action { @@ -171,6 +173,7 @@ Item { icon.color: Style.current.red //% "Ban" text: qsTrId("ban") + enabled: chatsModel.communities.activeCommunity.admin onTriggered: chatsModel.communities.banUserFromCommunity(model.pubKey, chatsModel.communities.activeCommunity.id) } /* Separator {} */