From ffefff6c6ed10c9992c9de7fa4f99a30f1f99901 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 25 Jan 2018 13:53:53 +0100 Subject: Only display one error when failing to send a mail. --- views/log/qml/View.qml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'views') 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 { if (subtype == Kube.Notifications.connectionError) { return hostNotFoundErrorComponent } + if (subtype == Kube.Notifications.transmissionError) { + return transmissionErrorComponent + } return detailsComponent } @@ -326,4 +329,38 @@ Controls.SplitView { } } } + + Component { + id: transmissionErrorComponent + Item { + Column { + anchors { + top: parent.top + left: parent.left + right: parent.right + } + spacing: Kube.Units.largeSpacing + Column { + Kube.Heading { + id: heading + text: qsTr("Failed to send the message.") + color: Kube.Colors.warningColor + } + Kube.Label { + id: subHeadline + text: accountName + color: Kube.Colors.disabledTextColor + wrapMode: Text.Wrap + } + } + Kube.Button { + text: qsTr("Try again") + onClicked: { + Kube.Fabric.postMessage(Kube.Messages.sendOutbox, {}) + } + } + } + } + } + } -- cgit v1.2.3