parent
0a7201b3bf
commit
8763238369
|
@ -370,6 +370,9 @@ proc leaveCommunity*(self: Controller) =
|
||||||
proc removeUserFromCommunity*(self: Controller, pubKey: string) =
|
proc removeUserFromCommunity*(self: Controller, pubKey: string) =
|
||||||
self.communityService.removeUserFromCommunity(self.sectionId, pubKey)
|
self.communityService.removeUserFromCommunity(self.sectionId, pubKey)
|
||||||
|
|
||||||
|
proc banUserFromCommunity*(self: Controller, pubKey: string) =
|
||||||
|
self.communityService.banUserFromCommunity(self.sectionId, pubKey)
|
||||||
|
|
||||||
proc editCommunity*(
|
proc editCommunity*(
|
||||||
self: Controller,
|
self: Controller,
|
||||||
name: string,
|
name: string,
|
||||||
|
|
|
@ -238,6 +238,9 @@ method leaveCommunity*(self: AccessInterface) {.base.} =
|
||||||
method removeUserFromCommunity*(self: AccessInterface, pubKey: string) {.base.} =
|
method removeUserFromCommunity*(self: AccessInterface, pubKey: string) {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
|
method banUserFromCommunity*(self: AccessInterface, pubKey: string) {.base.} =
|
||||||
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
method editCommunity*(self: AccessInterface, name: string, description: string, access: int, ensOnly: bool, color: string, imagePath: string, aX: int, aY: int, bX: int, bY: int) {.base.} =
|
method editCommunity*(self: AccessInterface, name: string, description: string, access: int, ensOnly: bool, color: string, imagePath: string, aX: int, aY: int, bX: int, bY: int) {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
|
|
|
@ -724,6 +724,9 @@ method leaveCommunity*(self: Module) =
|
||||||
method removeUserFromCommunity*(self: Module, pubKey: string) =
|
method removeUserFromCommunity*(self: Module, pubKey: string) =
|
||||||
self.controller.removeUserFromCommunity(pubKey)
|
self.controller.removeUserFromCommunity(pubKey)
|
||||||
|
|
||||||
|
method banUserFromCommunity*(self: Module, pubKey: string) =
|
||||||
|
self.controller.banUserFromCommunity(pubkey)
|
||||||
|
|
||||||
method editCommunity*(self: Module, name: string, description: string,
|
method editCommunity*(self: Module, name: string, description: string,
|
||||||
access: int, ensOnly: bool, color: string,
|
access: int, ensOnly: bool, color: string,
|
||||||
imagePath: string,
|
imagePath: string,
|
||||||
|
|
|
@ -241,6 +241,9 @@ QtObject:
|
||||||
proc removeUserFromCommunity*(self: View, pubKey: string) {.slot.} =
|
proc removeUserFromCommunity*(self: View, pubKey: string) {.slot.} =
|
||||||
self.delegate.removeUserFromCommunity(pubKey)
|
self.delegate.removeUserFromCommunity(pubKey)
|
||||||
|
|
||||||
|
proc banUserFromCommunity*(self: View, pubKey: string) {.slot.} =
|
||||||
|
self.delegate.banUserFromCommunity(pubKey)
|
||||||
|
|
||||||
proc editCommunity*(self: View, name: string, description: string, access: int, ensOnly: bool, color: string, imagePath: string, aX: int, aY: int, bX: int, bY: int) {.slot.} =
|
proc editCommunity*(self: View, name: string, description: string, access: int, ensOnly: bool, color: string, imagePath: string, aX: int, aY: int, bX: int, bY: int) {.slot.} =
|
||||||
self.delegate.editCommunity(name, description, access, ensOnly, color, imagePath, aX, aY, bX, bY)
|
self.delegate.editCommunity(name, description, access, ensOnly, color, imagePath, aX, aY, bX, bY)
|
||||||
|
|
||||||
|
|
|
@ -110,9 +110,6 @@ proc requestCommunityInfo*(self: Controller, communityId: string) =
|
||||||
proc importCommunity*(self: Controller, communityKey: string) =
|
proc importCommunity*(self: Controller, communityKey: string) =
|
||||||
self.communityService.importCommunity(communityKey)
|
self.communityService.importCommunity(communityKey)
|
||||||
|
|
||||||
proc banUserFromCommunity*(self: Controller, communityId: string, pubKey: string) =
|
|
||||||
self.communityService.removeUserFromCommunity(communityId, pubKey)
|
|
||||||
|
|
||||||
proc setCommunityMuted*(self: Controller, communityId: string, muted: bool) =
|
proc setCommunityMuted*(self: Controller, communityId: string, muted: bool) =
|
||||||
self.communityService.setCommunityMuted(communityId, muted)
|
self.communityService.setCommunityMuted(communityId, muted)
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,6 @@ method reorderCommunityCategories*(self: AccessInterface, communityId: string, c
|
||||||
method reorderCommunityChannel*(self: AccessInterface, communityId: string, categoryId: string, chatId: string, position: int) {.base} =
|
method reorderCommunityChannel*(self: AccessInterface, communityId: string, categoryId: string, chatId: string, position: int) {.base} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
method banUserFromCommunity*(self: AccessInterface, pubKey: string, communityId: string) {.base.} =
|
|
||||||
raise newException(ValueError, "No implementation available")
|
|
||||||
|
|
||||||
method isUserMemberOfCommunity*(self: AccessInterface, communityId: string): bool {.base.} =
|
method isUserMemberOfCommunity*(self: AccessInterface, communityId: string): bool {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
|
|
|
@ -157,9 +157,6 @@ method reorderCommunityCategories*(self: Module, communityId: string, categoryId
|
||||||
# self.controller.reorderCommunityCategories(communityId, categoryId, position)
|
# self.controller.reorderCommunityCategories(communityId, categoryId, position)
|
||||||
discard
|
discard
|
||||||
|
|
||||||
method banUserFromCommunity*(self: Module, pubKey: string, communityId: string) =
|
|
||||||
self.controller.banUserFromCommunity(communityId, pubkey)
|
|
||||||
|
|
||||||
method requestToJoinCommunity*(self: Module, communityId: string, ensName: string) =
|
method requestToJoinCommunity*(self: Module, communityId: string, ensName: string) =
|
||||||
self.controller.requestToJoinCommunity(communityId, ensName)
|
self.controller.requestToJoinCommunity(communityId, ensName)
|
||||||
|
|
||||||
|
|
|
@ -80,9 +80,6 @@ QtObject:
|
||||||
proc reorderCommunityChannel*(self: View, communityId: string, categoryId: string, chatId: string, position: int): string {.slot} =
|
proc reorderCommunityChannel*(self: View, communityId: string, categoryId: string, chatId: string, position: int): string {.slot} =
|
||||||
self.delegate.reorderCommunityChannel(communityId, categoryId, chatId, position)
|
self.delegate.reorderCommunityChannel(communityId, categoryId, chatId, position)
|
||||||
|
|
||||||
proc banUserFromCommunity*(self: View, pubKey: string, communityId: string) {.slot.} =
|
|
||||||
self.delegate.banUserFromCommunity(communityId, pubKey)
|
|
||||||
|
|
||||||
proc requestToJoinCommunity*(self: View, communityId: string, ensName: string) {.slot.} =
|
proc requestToJoinCommunity*(self: View, communityId: string, ensName: string) {.slot.} =
|
||||||
self.delegate.requestToJoinCommunity(communityId, ensName)
|
self.delegate.requestToJoinCommunity(communityId, ensName)
|
||||||
|
|
||||||
|
|
|
@ -192,8 +192,7 @@ Item {
|
||||||
icon.name: "cancel"
|
icon.name: "cancel"
|
||||||
type: StatusMenuItem.Type.Danger
|
type: StatusMenuItem.Type.Danger
|
||||||
enabled: root.community.amISectionAdmin
|
enabled: root.community.amISectionAdmin
|
||||||
// Not Refactored Yet
|
onTriggered: root.store.banUserFromCommunity(model.id)
|
||||||
// onTriggered: chatsModel.communities.banUserFromCommunity(model.pubKey, root.community.id)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,6 +238,10 @@ QtObject {
|
||||||
chatCommunitySectionModule.removeUserFromCommunity(pubKey);
|
chatCommunitySectionModule.removeUserFromCommunity(pubKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function banUserFromCommunity(pubKey) {
|
||||||
|
chatCommunitySectionModule.banUserFromCommunity(pubKey);
|
||||||
|
}
|
||||||
|
|
||||||
function createCommunityChannel(channelName, channelDescription, channelEmoji, channelColor,
|
function createCommunityChannel(channelName, channelDescription, channelEmoji, channelColor,
|
||||||
categoryId) {
|
categoryId) {
|
||||||
chatCommunitySectionModule.createCommunityChannel(channelName, channelDescription,
|
chatCommunitySectionModule.createCommunityChannel(channelName, channelDescription,
|
||||||
|
|
|
@ -143,7 +143,7 @@ StatusAppTwoPanelLayout {
|
||||||
|
|
||||||
onUserProfileClicked: Global.openProfilePopup(id)
|
onUserProfileClicked: Global.openProfilePopup(id)
|
||||||
onKickUserClicked: root.rootStore.removeUserFromCommunity(id)
|
onKickUserClicked: root.rootStore.removeUserFromCommunity(id)
|
||||||
onBanUserClicked: console.debug("NOT IMPLEMENTED") // TODO: implement me
|
onBanUserClicked: root.rootStore.banUserFromCommunity(id)
|
||||||
onMembershipRequestsClicked: Global.openPopup(membershipRequestPopup, {
|
onMembershipRequestsClicked: Global.openPopup(membershipRequestPopup, {
|
||||||
communitySectionModule: root.chatCommunitySectionModule
|
communitySectionModule: root.chatCommunitySectionModule
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue