1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-05 18:22:46 +00:00

Implemented collections + misc UI improvements

* There is a basic collection page, allowing the user to browse through
  collections. It has a sort function, that sort of works
* Item cards now show a bar indicating play time
* Item cards now have a black/white (depending on theme) shim, improving
  readability.
* The resume watching section now actually loads items
This commit is contained in:
Chris Josten 2020-09-27 16:54:45 +02:00
parent 5ea17070fe
commit 5d395ad7b6
15 changed files with 363 additions and 73 deletions

View file

@ -22,6 +22,7 @@ CoverBackground {
imageTypes: ["Primary"]
sortBy: ["IsFavoriteOrLiked", "Random"]
recursive: true
parentId: appWindow.collectionId
Component.onCompleted: reload()
}
@ -32,6 +33,7 @@ CoverBackground {
imageTypes: ["Primary"]
sortBy: ["IsFavoriteOrLiked", "Random"]
recursive: true
parentId: appWindow.collectionId
Component.onCompleted: reload()
}
@ -59,7 +61,8 @@ CoverBackground {
clip: true
height: row1.height
width: height
source: Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags["Primary"], "Primary", {"maxHeight": row1.height})
source: model.id ? Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags["Primary"], "Primary", {"maxHeight": row1.height})
: ""
fillMode: Image.PreserveAspectCrop
}
}
@ -120,6 +123,16 @@ CoverBackground {
}
}
Connections {
target: appWindow
onCollectionIdChanged: {
randomItems1.parentId = collectionId
randomItems2.parentId = collectionId
randomItems1.reload()
randomItems2.reload()
}
}
Timer {
property bool odd: false
running: true