status-desktop/ui/imports/shared/views/NoFriendsRectangle.qml
Lukáš Tinkl 3281e841db fix: Optimize ContactsView & MembersTabPanel settings pages
- removed nested ListViews inside StackLayouts, in order to reduce the
memory footprint and improve performance, and also to be able to better
manage the scrolling
- no more unrolled multiple listviews, which again hurt the performance;
now the views instantiate the delegates dynamically on the fly
- the tab bar and the search fields now stick to the top of the page,
with the users list view scrolling independently
- both views now uniformly use the common `ContactListItemDelegate`
- the received/sent CRs are now combined into one `pendingContacts`
model
- factored out common search/filter criteria into a new, separate SFPM
`UserFilterContainer` component
- fix an issue where StatusContactVerificationIcons wasn't properly
displaying the "blocked" state/icon
- fix documentation comments, removed relative imports, and updated some

Fixes #16612
Fixes #16958
2025-01-14 10:31:58 +01:00

47 lines
1.3 KiB
QML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import QtQuick 2.15
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import utils 1.0
import shared.popups 1.0
Item {
id: root
implicitWidth: 260
implicitHeight: visible ? 120 : 0
property string text: inviteButtonVisible ? qsTr("You dont have any contacts yet. Invite your friends to start chatting.")
: qsTr("No users match your search")
property alias textColor: noContacts.color
property bool inviteButtonVisible: true
StatusBaseText {
id: noContacts
text: root.text
color: Theme.palette.baseColor1
anchors.top: parent.top
anchors.topMargin: Theme.padding
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
}
StatusButton {
text: qsTr("Invite friends")
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: noContacts.bottom
anchors.topMargin: Theme.padding
visible: root.inviteButtonVisible
onClicked: inviteFriendsPopup.createObject(root).open()
}
Component {
id: inviteFriendsPopup
InviteFriendsPopup {
destroyOnClose: true
}
}
}