summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorLoren Burkholder <55629213+LorenDB@users.noreply.github.com>2022-04-22 19:59:40 -0400
committerGitHub <noreply@github.com>2022-04-22 23:59:40 +0000
commit6672e765d7a1f51381521538d6c53abb6303f079 (patch)
treec09936eae0bdb118c5d6069e98bfcb46a44f9559 /resources/qml
parentMerge pull request #1054 from tastytea/image-pack-changes/pack-id (diff)
downloadnheko-6672e765d7a1f51381521538d6c53abb6303f079.tar.xz
Search room members (#1049)
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/MatrixTextField.qml2
-rw-r--r--resources/qml/dialogs/RoomMembers.qml35
2 files changed, 34 insertions, 3 deletions
diff --git a/resources/qml/MatrixTextField.qml b/resources/qml/MatrixTextField.qml

index fec3f6b4..3f0f77ed 100644 --- a/resources/qml/MatrixTextField.qml +++ b/resources/qml/MatrixTextField.qml
@@ -117,12 +117,12 @@ ColumnLayout { palette: Nheko.colors color: labelC.color opacity: labelC.text ? 0 : 1 + focus: true onTextEdited: c.textEdited() onAccepted: c.accepted() onEditingFinished: c.editingFinished() - background: Rectangle { id: backgroundRect diff --git a/resources/qml/dialogs/RoomMembers.qml b/resources/qml/dialogs/RoomMembers.qml
index 55d5488b..8a12e5bc 100644 --- a/resources/qml/dialogs/RoomMembers.qml +++ b/resources/qml/dialogs/RoomMembers.qml
@@ -63,6 +63,37 @@ ApplicationWindow { onClicked: TimelineManager.openInviteUsers(members.roomId) } + MatrixTextField { + id: searchBar + + Layout.fillWidth: true + placeholderText: qsTr("Search...") + onTextChanged: members.setFilterString(text) + + Component.onCompleted: forceActiveFocus() + } + + RowLayout { + spacing: Nheko.paddingMedium + + Label { + text: qsTr("Sort by: ") + color: Nheko.colors.text + } + + ComboBox { + model: ListModel { + ListElement { data: MemberList.Mxid; text: qsTr("User ID") } + ListElement { data: MemberList.DisplayName; text: qsTr("Display name") } + ListElement { data: MemberList.Powerlevel; text: qsTr("Power level") } + } + textRole: "text" + valueRole: "data" + onCurrentValueChanged: members.sortBy(currentValue) + Layout.fillWidth: true + } + } + ScrollView { palette: Nheko.colors padding: Nheko.paddingMedium @@ -172,14 +203,14 @@ ApplicationWindow { width: parent.width visible: (members.numUsersLoaded < members.memberCount) && members.loadingMoreMembers // use the default height if it's visible, otherwise no height at all - height: membersLoadingSpinner.height + height: membersLoadingSpinner.implicitHeight anchors.margins: Nheko.paddingMedium Spinner { id: membersLoadingSpinner anchors.centerIn: parent - height: visible ? 35 : 0 + implicitHeight: parent.visible ? 35 : 0 } }