From 5fc85af04bb35c3fa2697a9c004f9ad07386c4bc Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Wed, 4 Aug 2021 14:34:06 +0200 Subject: [PATCH] fix(@desktop/communities): Remove search from invite fixes #3053 Align invite popup with design --- .../CommunityProfilePopupInviteFriendsView.qml | 13 +++++++++++-- ui/shared/ContactsListAndSearch.qml | 11 ++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupInviteFriendsView.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupInviteFriendsView.qml index c3e62e5c4f..8cb319cd14 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupInviteFriendsView.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CommunityProfilePopupInviteFriendsView.qml @@ -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 } } diff --git a/ui/shared/ContactsListAndSearch.qml b/ui/shared/ContactsListAndSearch.qml index 0cf2e2b78f..0a73677aa8 100644 --- a/ui/shared/ContactsListAndSearch.qml +++ b/ui/shared/ContactsListAndSearch.qml @@ -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