fix: Community settings member context menu (#11150)

This commit is contained in:
Igor Sirotin 2023-06-20 10:14:25 +03:00 committed by GitHub
parent 54ae6a3154
commit f17e49fe32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -16,6 +16,7 @@ import "../../layouts"
SettingsPageLayout {
id: root
property var rootStore
property var membersModel
property var bannedMembersModel
property var pendingMemberRequestsModel
@ -105,7 +106,7 @@ SettingsPageLayout {
CommunityMembersTabPanel {
model: root.membersModel
communityMemberContextMenu: root.communityMemberContextMenu
rootStore: root.rootStore
placeholderText: {
if (root.membersModel.count === 0) {
return qsTr("No members to search")
@ -133,7 +134,7 @@ SettingsPageLayout {
CommunityMembersTabPanel {
model: root.pendingMemberRequestsModel
communityMemberContextMenu: root.communityMemberContextMenu
rootStore: root.rootStore
placeholderText: {
if (root.pendingMemberRequestsModel.count === 0) {
return qsTr("No pending requests to search")
@ -154,7 +155,7 @@ SettingsPageLayout {
CommunityMembersTabPanel {
model: root.declinedMemberRequestsModel
communityMemberContextMenu: root.communityMemberContextMenu
rootStore: root.rootStore
placeholderText: {
if (root.declinedMemberRequestsModel.count === 0) {
return qsTr("No rejected members to search")
@ -174,7 +175,7 @@ SettingsPageLayout {
CommunityMembersTabPanel {
model: root.bannedMembersModel
communityMemberContextMenu: root.communityMemberContextMenu
rootStore: root.rootStore
placeholderText: {
if (root.bannedMembersModel.count === 0) {
return qsTr("No banned members to search")

View File

@ -19,7 +19,7 @@ Item {
property string placeholderText
property var model
property var communityMemberContextMenu
property var rootStore
signal kickUserClicked(string id, string name)
signal banUserClicked(string id, string name)

View File

@ -221,6 +221,7 @@ StatusSectionLayout {
}
CommunityMembersSettingsPanel {
rootStore: root.rootStore
membersModel: root.community.members
bannedMembersModel: root.community.bannedMembers
pendingMemberRequestsModel: root.community.pendingMemberRequests