summaryrefslogtreecommitdiff
path: root/gui/qml/FailDialog.qml
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-09-08 16:51:32 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-09-08 20:10:17 +0200
commite217f990bcdc687b8c0cdf8f84929aaf5aa8f935 (patch)
treea71583b024a9a0cc5115d472206973cbea555bd1 /gui/qml/FailDialog.qml
parenta40434d402ceb9cfacff59aeeab12a3d6b13a0ed (diff)
[feat] improve phrasing for login dialog, split into its own file
Diffstat (limited to 'gui/qml/FailDialog.qml')
-rw-r--r--gui/qml/FailDialog.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/gui/qml/FailDialog.qml b/gui/qml/FailDialog.qml
new file mode 100644
index 0000000..3da421b
--- /dev/null
+++ b/gui/qml/FailDialog.qml
@@ -0,0 +1,23 @@
+import QtQuick 2.0
+import QtQuick.Dialogs 1.2
+
+MessageDialog {
+ title: qsTr("Initialization Error")
+ modality: Qt.NonModal
+ text: ""
+ onAccepted: retryOrQuit()
+ onRejected: retryOrQuit()
+
+ Component.onCompleted: {
+ buttons: MessageDialog.Ok
+ }
+
+ function retryOrQuit() {
+ if (ctx.loginDialog == 'true') {
+ login.visible = true
+ } else {
+ backend.quit()
+ }
+ }
+}
+