GODT-1549: Add notification when address list changes.

This commit is contained in:
Jakub
2022-05-11 09:47:09 +02:00
parent 62499a5630
commit 415d08b411
4 changed files with 76 additions and 20 deletions

View File

@ -74,7 +74,8 @@ QtObject {
root.resetBridge,
root.deleteAccount,
root.noKeychain,
root.rebuildKeychain
root.rebuildKeychain,
root.addressChanged
]
// Connection
@ -940,4 +941,37 @@ QtObject {
}
]
}
property Notification addressChanged: Notification {
title: qsTr("Address list changes")
description: qsTr("The address list for your account has changed. You might need to reconfigure your email client.")
brief: description
icon: "./icons/ic-exclamation-circle-filled.svg"
type: Notification.NotificationType.Warning
group: Notifications.Group.Configuration
Connections {
target: root.backend
onAddressChanged: {
root.addressChanged.description = qsTr("The address list for your account %1 has changed. You might need to reconfigure your email client.").arg(address)
root.addressChanged.active = true
}
onAddressChangedLogout: {
root.addressChanged.description = qsTr("The address list for your account %1 has changed. You have to reconfigure your email client.").arg(address)
root.addressChanged.active = true
}
}
action: [
Action {
text: qsTr("OK")
onTriggered: {
root.addressChanged.active = false
}
}
]
}
}