fix(InviteFriendsToCommunityPopup): fixed popup height issues

Closes #5362
This commit is contained in:
Alexandra Betouni 2022-04-06 20:13:49 +03:00 committed by Iuri Matias
parent 3a4c6bfd71
commit d0701e900c
4 changed files with 8 additions and 9 deletions

View File

@ -15,7 +15,8 @@ import "."
Item {
id: root
height: childrenRect.height + 24
height: (chatKey.height + message.height + existingContacts.height
+ searchResults.height + noContactsRect.height + 24)
property var rootStore
property var contactsStore
@ -67,6 +68,7 @@ Item {
//% "Enter ENS username or chat key"
placeholderText: qsTrId("enter-contact-code")
visible: showSearch
height: visible ? implicitHeight : 0
Keys.onReleased: {
successMessage = "";
searchResults.pubKey = "";
@ -165,6 +167,7 @@ Item {
id: message
text: root.validationError || successMessage
visible: root.validationError !== "" || successMessage !== ""
height: visible ? contentHeight : 0
font.pixelSize: 13
color: !!root.validationError ? Style.current.danger : Style.current.success
anchors.top: chatKey.bottom
@ -177,7 +180,6 @@ Item {
contactsStore: root.contactsStore
community: root.community
visible: showContactList
hideCommunityMembers: root.hideCommunityMembers
anchors.topMargin: this.height > 0 ? Style.current.halfPadding : 0
@ -235,10 +237,7 @@ Item {
NoFriendsRectangle {
id: noContactsRect
visible: showContactList
anchors.top: chatKey.bottom
anchors.topMargin: Style.current.xlPadding * 3
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
anchors.centerIn: parent
rootStore: root.rootStore
}
}

View File

@ -12,6 +12,7 @@ Item {
id: root
anchors.left: parent.left
anchors.right: parent.right
height: visible ? Math.min(contactListView.contentHeight, (expanded ? 320 : 192)) : 0
property var contactsStore
property var community
@ -28,7 +29,6 @@ Item {
return parts.some(p => p.startsWith(filter))
}
height: Math.min(contactListView.contentHeight, (expanded ? 320 : 192))
ScrollView {
anchors.fill: parent

View File

@ -11,13 +11,13 @@ import "../popups"
Item {
id: noContactsRect
width: 260
height: visible ? 120 : 0
//% "You dont have any contacts yet. Invite your friends to start chatting."
property string text: qsTrId("you-don-t-have-any-contacts-yet--invite-your-friends-to-start-chatting-")
property alias textColor: noContacts.color
property var rootStore
StatusBaseText {
id: noContacts
text: noContactsRect.text

View File

@ -16,8 +16,8 @@ import StatusQ.Components 0.1
Item {
id: root
height: 64
width: parent.width
height: hasExistingContacts ? 64 : 0
property bool hasExistingContacts: false
property bool showProfileNotFoundMessage: false