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

@ -51,12 +51,13 @@ Page {
}
// Tell SilicaFlickable the height of its content.
contentHeight: column.height
contentHeight: column.visible ? column.height : errorColumn.height
// Place our content in a Column. The PageHeader is always placed at the top
// of the page, followed by our content.
Column {
id: column
visible: mediaLibraryModel.status != ApiModel.Error
width: page.width
//spacing: Theme.paddingLarge
@ -123,25 +124,31 @@ Page {
}
}
}
Column {
width: parent.width
visible: mediaLibraryModel.status == ApiModel.Error
PageHeader {
title: qsTr("Network error")
//clickable: false
}
}
PlainLabel {
text: qsTr("An error has occurred. Please try again.")
}
Item { width: 1; height: Theme.paddingLarge }
Button {
text: qsTr("Retry")
anchors.horizontalCenter: parent.horizontalCenter
onClicked: loadModels(true)
}
Item { width: 1; height: Theme.paddingLarge }
Column {
id: errorColumn
width: parent.width
visible: mediaLibraryModel.status == ApiModel.Error
PageHeader {
title: qsTr("Network error")
}
Item {
width: 1
height: page.height / 3
}
PlainLabel {
text: qsTr("An error has occurred. Please try again.")
}
Item { width: 1; height: Theme.paddingLarge }
Button {
text: qsTr("Retry")
anchors.horizontalCenter: parent.horizontalCenter
onClicked: loadModels(true)
}
Item { width: 1; height: Theme.paddingLarge }
}
}