UserSearchPage: Move "Enter User ID" action into placeholder

This commit is contained in:
Tobias Fella
2025-08-21 14:51:45 +02:00
committed by Joshua Goins
parent f58212e8de
commit 1e1ad389e3
2 changed files with 21 additions and 10 deletions

View File

@@ -91,6 +91,16 @@ Kirigami.ScrollablePage {
*/
property string customPlaceholderIcon: ""
/**
* @brief Action to be shown in the "no search" placeholder
*/
property Kirigami.Action noSearchHelpfulAction
/**
* @brief Action to be shown in the "no result" placeholder
*/
property Kirigami.Action noResultHelpfulAction
/**
* @brief Force the search field to be focussed.
*/
@@ -179,12 +189,14 @@ Kirigami.ScrollablePage {
id: noSearchMessage
anchors.centerIn: parent
visible: searchField.text.length === 0 && listView.count === 0 && customPlaceholder.text.length === 0
helpfulAction: root.noSearchHelpfulAction
}
Kirigami.PlaceholderMessage {
id: noResultMessage
anchors.centerIn: parent
visible: searchField.text.length > 0 && listView.count === 0 && !root.model.searching && customPlaceholder.text.length === 0
helpfulAction: root.noResultHelpfulAction
}
Kirigami.PlaceholderMessage {