UserSearchPage: Move "Enter User ID" action into placeholder

This commit is contained in:
Tobias Fella
2025-08-21 14:51:45 +02:00
parent 8f6683fd1d
commit 1bd39f282e
2 changed files with 21 additions and 10 deletions

View File

@@ -39,16 +39,6 @@ SearchPage {
connection: root.connection
}
listHeaderDelegate: Delegates.RoundedItemDelegate {
onClicked: _private.openManualUserDialog()
activeFocusOnTab: false // We handle moving to this item via up/down arrows, otherwise the tab order is wacky
text: i18n("Enter a user ID")
icon.name: "list-add-user"
icon.width: Kirigami.Units.gridUnit * 2
icon.height: Kirigami.Units.gridUnit * 2
}
modelDelegate: Delegates.RoundedItemDelegate {
id: userDelegate
required property string userId
@@ -92,6 +82,15 @@ SearchPage {
noSearchPlaceholderMessage: i18n("Enter text to start searching for your friends")
noResultPlaceholderMessage: i18nc("@info:label", "No matches found")
noSearchHelpfulAction: noResultHelpfulAction
noResultHelpfulAction: Kirigami.Action {
icon.name: "list-add-user"
text: i18nc("@action:button", "Enter a user ID")
onTriggered: _private.openManualUserDialog()
tooltip: text
}
Component {
id: manualUserDialog
ManualUserDialog {}