fix(@desktop/communities): Remove search from invite

fixes #3053

Align invite popup with design
This commit is contained in:
Anthony Laibe 2021-08-04 14:34:06 +02:00 committed by Iuri Matias
parent 96f3d6b8e1
commit 5fc85af04b
2 changed files with 21 additions and 3 deletions

View File

@ -45,15 +45,24 @@ Column {
}
StatusModalDivider {
bottomPadding: 16
bottomPadding: Style.current.padding
}
StyledText {
id: headline
text: qsTr("Contacts")
font.pixelSize: Style.current.primaryTextFontSize
color: Style.current.secondaryText
anchors.left: parent.left
anchors.leftMargin: Style.current.padding
}
ContactsListAndSearch {
id: contactFieldAndList
anchors.topMargin: Style.current.smallPadding
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 32
showCheckbox: true
hideCommunityMembers: true
showSearch: false
}
}

View File

@ -16,6 +16,7 @@ Item {
property string ensUsername : ""
property bool showCheckbox: false
property bool showContactList: true
property bool showSearch: true
signal userClicked(bool isContact, string pubKey, string ensName, string address)
property var pubKeys: ([])
property bool hideCommunityMembers: false
@ -50,6 +51,7 @@ Item {
id: chatKey
//% "Enter ENS username or chat key"
placeholderText: qsTrId("enter-contact-code")
visible: showSearch
Keys.onReleased: {
successMessage = "";
searchResults.pubKey = "";
@ -150,7 +152,14 @@ Item {
visible: showContactList
hideCommunityMembers: root.hideCommunityMembers
anchors.topMargin: this.height > 0 ? Style.current.halfPadding : 0
anchors.top: message.visible? message.bottom : chatKey.bottom
anchors.top: {
if (message.visible) {
return message.bottom
}
if (chatKey.visible) {
return chatKey.bottom
}
}
showCheckbox: root.showCheckbox
filterText: chatKey.text
pubKeys: root.pubKeys