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

Added user details and somewhat imporved error handling

* [UI] Improved: error handling should be slightly better
* [UI] Improved: settings now show the user name and picture instead of the user id if network is available.
This commit is contained in:
Chris Josten 2020-10-10 15:56:04 +02:00
parent 8a683df2a2
commit d3a7c17586
11 changed files with 240 additions and 80 deletions

View file

@ -68,6 +68,31 @@ Page {
running: pageRoot._loading
}
SilicaFlickable {
anchors.fill: parent
contentHeight: errorContent.height
visible: jItem.status == JellyfinItem.Error
PullDownMenu {
busy: jItem.status == JellyfinItem.Loading
MenuItem {
text: qsTr("Retry")
onClicked: jItem.reload()
}
}
Column {
id: errorContent
width: parent.width
ViewPlaceholder {
enabled: true
text: qsTr("An error has occured")
hintText: jItem.errorString
}
}
}
JellyfinItem {
id: jItem
apiClient: ApiClient

View file

@ -42,6 +42,8 @@ BaseDetailPage {
cellWidth: Constants.libraryDelegateWidth
cellHeight: Utils.usePortraitCover(itemData.CollectionType) ? Constants.libraryDelegatePosterHeight
: Constants.libraryDelegateHeight
visible: itemData.status !== JellyfinItem.Error
header: PageHeader {
title: itemData.name || qsTr("Loading")
}

View file

@ -34,9 +34,16 @@ BaseDetailPage {
fields: ["Overview"]
}
Connections {
target: itemData
onReady: episodeModel.reload()
}
SilicaListView {
anchors.fill: parent
contentHeight: content.height
visible: itemData.status !== JellyfinItem.Error
header: PageHeader {
title: itemData.name
description: itemData.seriesName

View file

@ -28,6 +28,7 @@ BaseDetailPage {
SilicaFlickable {
anchors.fill: parent
contentHeight: content.height
visible: itemData.status !== JellyfinItem.Error
Column {
id: content
@ -68,6 +69,10 @@ BaseDetailPage {
show: itemData.jellyfinId
onShowChanged: reload()
}
Connections {
target: itemData
onReady: showSeasonsModel.reload()
}
SilicaListView {
model: showSeasonsModel

View file

@ -23,6 +23,7 @@ import Sailfish.Silica 1.0
BaseDetailPage {
SilicaFlickable {
anchors.fill: parent
visible: itemData.status !== JellyfinItem.Error
PageHeader {
title: itemData.name
}

View file

@ -36,6 +36,7 @@ BaseDetailPage {
SilicaFlickable {
anchors.fill: parent
contentHeight: content.height + Theme.paddingLarge
visible: itemData.status !== JellyfinItem.Error
VerticalScrollDecorator {}