mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-10-20 12:04:36 +00:00
WIP: implement search
This commit is contained in:
parent
79d378c9ed
commit
eac8faf173
9 changed files with 356 additions and 77 deletions
40
sailfish/qml/components/search/SearchResults.qml
Normal file
40
sailfish/qml/components/search/SearchResults.qml
Normal file
|
@ -0,0 +1,40 @@
|
|||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
import nl.netsoj.chris.Jellyfin 1.0
|
||||
|
||||
SilicaListView {
|
||||
id: root
|
||||
model: query.length ? searchModel : 0
|
||||
property alias query: searchModel.searchTerm
|
||||
delegate: ListItem {
|
||||
width: parent.width
|
||||
height: Theme.itemSizeLarge
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
text: model.name
|
||||
}
|
||||
}
|
||||
add: Transition {
|
||||
NumberAnimation { property: "scale"; from: 0.0001; to: 1.0; }
|
||||
FadeAnimation { from: 0.0; to: 1.0; }
|
||||
}
|
||||
|
||||
move: Transition {
|
||||
NumberAnimation {
|
||||
properties: "x,y"
|
||||
}
|
||||
}
|
||||
|
||||
remove: Transition {
|
||||
NumberAnimation { property: "scale"; from: 1.0; to: 0.0001; }
|
||||
FadeAnimation { from: 1.0; to: 0.0; }
|
||||
}
|
||||
|
||||
SearchModel {
|
||||
id: searchModel
|
||||
apiClient: ApiClient
|
||||
recursive: true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue