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

View File

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

View File

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