GODT-1381: Use in-memory cache in case local cache is unavailable

- change: refactor GUI notification object
- add: global bridge errors
- add: when cache on disk cannot be initialized fallback to memory cache
- add: show notification for CoD failure
- change: do not allow login to IMAP and SMTP when CoD init failed
This commit is contained in:
Alexander Bilyak
2021-11-17 13:19:37 +01:00
committed by Jakub
parent 5af3e930ec
commit b82e2ca176
15 changed files with 161 additions and 70 deletions

View File

@ -55,12 +55,12 @@ Dialog {
}
switch (root.notification.type) {
case Notification.NotificationType.Info:
case Notification.NotificationType.Info:
return "./icons/ic-info.svg"
case Notification.NotificationType.Success:
case Notification.NotificationType.Success:
return "./icons/ic-success.svg"
case Notification.NotificationType.Warning:
case Notification.NotificationType.Danger:
case Notification.NotificationType.Warning:
case Notification.NotificationType.Danger:
return "./icons/ic-alert.svg"
}
}
@ -70,7 +70,7 @@ Dialog {
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: 8
colorScheme: root.colorScheme
text: root.notification.text
text: root.notification.title
type: Label.LabelType.Title
}