Space Search

Allow to refine searches to spaces only in the main exlore function.
Show which rooms are spaces in the search page.

Closes #577
This commit is contained in:
James Graham
2024-03-30 19:37:46 +00:00
parent 482d61ee47
commit 64b8cd5bcc
6 changed files with 64 additions and 7 deletions

View File

@@ -32,7 +32,13 @@ SearchPage {
/**
* @brief Whether results should only includes spaces.
*/
property bool showOnlySpaces: false
property bool showOnlySpaces: spacesOnlyButton.checked
onShowOnlySpacesChanged: updateSearch()
/**
* @brief Whetherthe button to toggle the showOnlySpaces state should be shown.
*/
property bool showOnlySpacesButton: true
/**
* @brief Signal emitted when a room is selected.
@@ -47,9 +53,22 @@ SearchPage {
Component.onCompleted: focusSearch()
headerTrailing: ServerComboBox {
id: serverComboBox
connection: root.connection
headerTrailing: RowLayout {
QQC2.Button {
id: spacesOnlyButton
icon.name: "globe"
display: QQC2.Button.IconOnly
checkable: true
text: i18nc("@action:button", "Only show spaces")
QQC2.ToolTip.visible: hovered
QQC2.ToolTip.text: text
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
}
ServerComboBox {
id: serverComboBox
connection: root.connection
}
}
model: PublicRoomListModel {