diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-25 13:53:53 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-25 14:03:13 +0100 |
commit | ffefff6c6ed10c9992c9de7fa4f99a30f1f99901 (patch) | |
tree | f684deccb992a2e9c57682e29cc8ece452af24a7 /views/log/qml/View.qml | |
parent | 27ab6710b6626517d1386cd90ca9065d3d36f370 (diff) | |
download | kube-ffefff6c6ed10c9992c9de7fa4f99a30f1f99901.tar.gz kube-ffefff6c6ed10c9992c9de7fa4f99a30f1f99901.zip |
Only display one error when failing to send a mail.
Diffstat (limited to 'views/log/qml/View.qml')
-rw-r--r-- | views/log/qml/View.qml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/views/log/qml/View.qml b/views/log/qml/View.qml index 4ae1a67c..14e2d543 100644 --- a/views/log/qml/View.qml +++ b/views/log/qml/View.qml | |||
@@ -177,6 +177,9 @@ Controls.SplitView { | |||
177 | if (subtype == Kube.Notifications.connectionError) { | 177 | if (subtype == Kube.Notifications.connectionError) { |
178 | return hostNotFoundErrorComponent | 178 | return hostNotFoundErrorComponent |
179 | } | 179 | } |
180 | if (subtype == Kube.Notifications.transmissionError) { | ||
181 | return transmissionErrorComponent | ||
182 | } | ||
180 | return detailsComponent | 183 | return detailsComponent |
181 | } | 184 | } |
182 | 185 | ||
@@ -326,4 +329,38 @@ Controls.SplitView { | |||
326 | } | 329 | } |
327 | } | 330 | } |
328 | } | 331 | } |
332 | |||
333 | Component { | ||
334 | id: transmissionErrorComponent | ||
335 | Item { | ||
336 | Column { | ||
337 | anchors { | ||
338 | top: parent.top | ||
339 | left: parent.left | ||
340 | right: parent.right | ||
341 | } | ||
342 | spacing: Kube.Units.largeSpacing | ||
343 | Column { | ||
344 | Kube.Heading { | ||
345 | id: heading | ||
346 | text: qsTr("Failed to send the message.") | ||
347 | color: Kube.Colors.warningColor | ||
348 | } | ||
349 | Kube.Label { | ||
350 | id: subHeadline | ||
351 | text: accountName | ||
352 | color: Kube.Colors.disabledTextColor | ||
353 | wrapMode: Text.Wrap | ||
354 | } | ||
355 | } | ||
356 | Kube.Button { | ||
357 | text: qsTr("Try again") | ||
358 | onClicked: { | ||
359 | Kube.Fabric.postMessage(Kube.Messages.sendOutbox, {}) | ||
360 | } | ||
361 | } | ||
362 | } | ||
363 | } | ||
364 | } | ||
365 | |||
329 | } | 366 | } |