fix(@desktop/communities): Can't copy to clipboard the link to community
Also fixed some minor bugs in the community popups. fixes #3959
This commit is contained in:
parent
7fcd280fe0
commit
b7bc528552
|
@ -98,6 +98,7 @@ Rectangle {
|
|||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Style.current.padding
|
||||
onClicked: openPopup(communityProfilePopup, {
|
||||
store: rootStore,
|
||||
community: root.activeCommunity
|
||||
})
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ StatusModal {
|
|||
icon.width: 20
|
||||
rotation: 180
|
||||
onClicked: {
|
||||
openroot(communitiesrootComponent)
|
||||
openPopup(communitiesPopupComponent)
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,10 +63,11 @@ StatusModal {
|
|||
onNotificationsButtonClicked: {
|
||||
root.store.setCommunityMuted(root.community.id, checked);
|
||||
}
|
||||
onEditButtonClicked: openroot(editCommunityroot, {
|
||||
onEditButtonClicked: openPopup(editCommunityPopup, {
|
||||
store: root.store,
|
||||
community: root.community
|
||||
})
|
||||
onTransferOwnershipButtonClicked: openroot(transferOwnershiproot, {privateKey: root.store.exportCommunity()})
|
||||
onTransferOwnershipButtonClicked: openPopup(transferOwnershiproot, {privateKey: root.store.exportCommunity()})
|
||||
onLeaveButtonClicked: {
|
||||
root.store.leaveCommunity(root.community.id);
|
||||
root.close();
|
||||
|
|
|
@ -163,7 +163,7 @@ StatusModal {
|
|||
icon.name: "delete"
|
||||
type: StatusListItem.Type.Danger
|
||||
sensor.onClicked: {
|
||||
openroot(deleteCategoryConfirmationDialogComponent, {
|
||||
openPopup(deleteCategoryConfirmationDialogComponent, {
|
||||
//% "Delete %1 category"
|
||||
title: qsTrId("delete--1-category").arg(root.contentItem.categoryName.input.text),
|
||||
//% "Are you sure you want to delete %1 category? Channels inside the category won’t be deleted."
|
||||
|
|
|
@ -88,8 +88,8 @@ QtObject {
|
|||
chatsModelInst.communities.createCommunity(communityName, communityDescription, checkedMembership, ensOnlySwitchChecked, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY);
|
||||
}
|
||||
|
||||
function editCommunity(communityName, communityDescription, checkedMembership, ensOnlySwitchChecked, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY) {
|
||||
chatsModelInst.communities.editCommunity(communityName, communityDescription, checkedMembership, ensOnlySwitchChecked, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY);
|
||||
function editCommunity(communityId, communityName, communityDescription, checkedMembership, ensOnlySwitchChecked, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY) {
|
||||
chatsModelInst.communities.editCommunity(communityId, communityName, communityDescription, checkedMembership, ensOnlySwitchChecked, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY);
|
||||
}
|
||||
|
||||
function createCommunityCategory(communityId, categoryName, channels) {
|
||||
|
|
|
@ -40,6 +40,7 @@ Item {
|
|||
chatInfoButton.icon.color: root.store.chatsModelInst.communities.activeCommunity.communityColor
|
||||
menuButton.visible: root.store.chatsModelInst.communities.activeCommunity.admin && root.store.chatsModelInst.communities.activeCommunity.canManageUsers
|
||||
chatInfoButton.onClicked: openPopup(communityProfilePopup, {
|
||||
store: root.store,
|
||||
community: root.store.chatsModelInst.communities.activeCommunity
|
||||
})
|
||||
|
||||
|
|
|
@ -6,4 +6,28 @@ QtObject {
|
|||
property var walletModelInst: walletModel
|
||||
property var profileModelInst: profileModel
|
||||
property MessageStore messageStore: MessageStore { }
|
||||
|
||||
function setCommunityMuted(communityId, checked) {
|
||||
chatsModelInst.communities.setCommunityMuted(communityId, checked);
|
||||
}
|
||||
|
||||
function exportCommunity() {
|
||||
chatsModelInst.communities.exportCommunity();
|
||||
}
|
||||
|
||||
function leaveCommunity(communityId) {
|
||||
chatsModelInst.communities.leaveCommunity(communityId);
|
||||
}
|
||||
|
||||
function createCommunity(communityName, communityDescription, checkedMembership, ensOnlySwitchChecked, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY) {
|
||||
chatsModelInst.communities.createCommunity(communityName, communityDescription, checkedMembership, ensOnlySwitchChecked, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY);
|
||||
}
|
||||
|
||||
function editCommunity(communityId, communityName, communityDescription, checkedMembership, ensOnlySwitchChecked, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY) {
|
||||
chatsModelInst.communities.editCommunity(communityId, communityName, communityDescription, checkedMembership, ensOnlySwitchChecked, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY);
|
||||
}
|
||||
|
||||
function copyToClipboard(text) {
|
||||
chatsModelInst.copyToClipboard(text);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,6 +258,7 @@ Item {
|
|||
text: qsTrId("view-community")
|
||||
icon.name: "group-chat"
|
||||
onTriggered: openPopup(communityProfilePopup, {
|
||||
store: appMain.rootStore,
|
||||
community: chatsModel.communities.observedCommunity
|
||||
})
|
||||
}
|
||||
|
@ -267,7 +268,7 @@ Item {
|
|||
//% "Edit Community"
|
||||
text: qsTrId("edit-community")
|
||||
icon.name: "edit"
|
||||
onTriggered: openPopup(editCommunityPopup, {community: chatsModel.communities.observedCommunity})
|
||||
onTriggered: openPopup(editCommunityPopup, {store: appMain.rootStore, community: chatsModel.communities.observedCommunity})
|
||||
}
|
||||
|
||||
StatusMenuSeparator {}
|
||||
|
|
Loading…
Reference in New Issue