GODT-1566: gui shows error notifications for IMAP/SMTP port errors on startup.

This commit is contained in:
Xavier Michelon
2022-09-27 08:28:33 +02:00
parent 86443252b1
commit d1cbf4f06c
3 changed files with 54 additions and 2 deletions

View File

@ -48,6 +48,8 @@ QtObject {
property var all: [
root.noInternet,
root.portIssueIMAP,
root.portIssueSMTP,
root.updateManualReady,
root.updateManualRestartNeeded,
root.updateManualError,
@ -98,6 +100,38 @@ QtObject {
}
}
property Notification portIssueIMAP: Notification {
description: qsTr("The IMAP server could not be started. Please check or change the IMAP port and restart the application.")
brief: qsTr("IMAP port error")
icon: "./icons/ic-alert.svg"
type: Notification.NotificationType.Danger
group: Notifications.Group.Connection
Connections {
target: Backend
function onPortIssueIMAP() {
root.portIssueIMAP.active = true
}
}
}
property Notification portIssueSMTP: Notification {
description: qsTr("The SMTP server could not be started. Please check or change the SMTP port and restart the application.")
brief: qsTr("SMTP port error")
icon: "./icons/ic-alert.svg"
type: Notification.NotificationType.Danger
group: Notifications.Group.Connection
Connections {
target: Backend
function onPortIssueSMTP() {
root.portIssueSMTP.active = true
}
}
}
// Updates
property Notification updateManualReady: Notification {
title: qsTr("Update to Bridge %1").arg(data ? data.version : "")