Verified Commit 787c2289 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

ErrorHandler: Add retry button

parent 7255fd14
...@@ -70,6 +70,7 @@ Kirigami.ApplicationWindow { ...@@ -70,6 +70,7 @@ Kirigami.ApplicationWindow {
anchors.fill: parent anchors.fill: parent
visible: webView.errorCode !== "" visible: webView.errorCode !== ""
onRefreshRequested: webView.reload()
} }
Loader { Loader {
......
...@@ -29,6 +29,8 @@ import org.kde.kirigami 2.0 as Kirigami ...@@ -29,6 +29,8 @@ import org.kde.kirigami 2.0 as Kirigami
Item { Item {
id: errorHandler id: errorHandler
signal refreshRequested
property string errorCode: "" property string errorCode: ""
property alias errorString: errorDescription.text property alias errorString: errorDescription.text
...@@ -58,5 +60,11 @@ Item { ...@@ -58,5 +60,11 @@ Item {
Item { Item {
Layout.fillHeight: true Layout.fillHeight: true
} }
Controls.ToolButton {
Layout.alignment: Qt.AlignHCenter
text: i18n("Retry")
icon.name: "view-refresh"
onClicked: errorHandler.refreshRequested()
}
} }
} }
...@@ -175,6 +175,8 @@ Kirigami.ApplicationWindow { ...@@ -175,6 +175,8 @@ Kirigami.ApplicationWindow {
bottom: navigation.top bottom: navigation.top
} }
visible: currentWebView.errorCode !== "" visible: currentWebView.errorCode !== ""
onRefreshRequested: currentWebView.reload()
} }
Loader { Loader {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment