mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-13 15:55:18 +00:00
3aba152206
- Channel is blank on first time joining - fixes: #6131 - Contacts list is empty when trying to invite/share community - fixes: #6139 - The same name is shown for all invited contacts - fixes: #6105 - The names and avatars of contacts are empty in the Contact requests - fixes: #6084 - 'Invite friends' dialog doesn't look good in the minimized app mode - fixes: #6106
85 lines
2.2 KiB
QML
85 lines
2.2 KiB
QML
import QtQuick 2.12
|
|
import QtQuick.Controls 2.3
|
|
import QtQuick.Layouts 1.3
|
|
import QtQml.Models 2.3
|
|
|
|
import StatusQ.Controls 0.1
|
|
import StatusQ.Components 0.1
|
|
import StatusQ.Popups 0.1
|
|
|
|
import utils 1.0
|
|
|
|
import "../../views"
|
|
import "../../panels/communities"
|
|
|
|
StatusModal {
|
|
id: popup
|
|
|
|
property var rootStore
|
|
property var contactsStore
|
|
property var community
|
|
property var communitySectionModule
|
|
property bool hasAddedContacts
|
|
|
|
signal sendInvites(var pubKeys)
|
|
|
|
onOpened: {
|
|
contentItem.community = community;
|
|
|
|
contentItem.contactListSearch.chatKey.text = "";
|
|
contentItem.contactListSearch.pubKey = "";
|
|
contentItem.contactListSearch.pubKeys = [];
|
|
contentItem.contactListSearch.ensUsername = "";
|
|
contentItem.contactListSearch.chatKey.forceActiveFocus(Qt.MouseFocusReason);
|
|
contentItem.contactListSearch.existingContacts.visible = hasAddedContacts;
|
|
contentItem.contactListSearch.noContactsRect.visible = !contentItem.contactListSearch.existingContacts.visible;
|
|
}
|
|
|
|
margins: 32
|
|
height: 550
|
|
|
|
//% "Invite friends"
|
|
header.title: qsTrId("invite-friends")
|
|
|
|
function proccesInviteResult(error) {
|
|
if (error) {
|
|
console.error('Error inviting', error)
|
|
contactFieldAndList.validationError = error
|
|
return
|
|
}
|
|
//% "Invite successfully sent"
|
|
popup.contentItem.contactListSearch.successMessage = qsTrId("invite-successfully-sent")
|
|
}
|
|
|
|
contentItem: CommunityProfilePopupInviteFriendsPanel {
|
|
id: contactFieldAndList
|
|
rootStore: popup.rootStore
|
|
contactsStore: popup.contactsStore
|
|
community: popup.community
|
|
}
|
|
|
|
leftButtons: [
|
|
StatusRoundButton {
|
|
icon.name: "arrow-right"
|
|
icon.height: 16
|
|
icon.width: 20
|
|
rotation: 180
|
|
onClicked: {
|
|
popup.close()
|
|
}
|
|
}
|
|
]
|
|
|
|
rightButtons: [
|
|
StatusButton {
|
|
enabled: popup.contentItem.contactListSearch.pubKeys.length > 0
|
|
//% "Invite"
|
|
text: qsTrId("invite-button")
|
|
onClicked : {
|
|
popup.sendInvites(popup.contentItem.contactListSearch.pubKeys)
|
|
}
|
|
}
|
|
]
|
|
}
|
|
|