GODT-1847: add option to export TLS Certificates in GUI.

This commit is contained in:
Xavier Michelon
2022-12-01 12:41:51 +01:00
parent 4375d77a98
commit 5b9c28e6f0
19 changed files with 2611 additions and 1389 deletions

View File

@ -208,6 +208,21 @@ SettingsView {
Layout.fillWidth: true
}
SettingsItem {
id: exportTLSCertificates
visible: root._isAdvancedShown
colorScheme: root.colorScheme
text: qsTr("Export TLS certificates")
actionText: qsTr("Export")
description: qsTr("Export the TLS private key and certificate used by the IMAP and SMTP servers.")
type: SettingsItem.Button
onClicked: {
Backend.exportTLSCertificates()
}
Layout.fillWidth: true
}
SettingsItem {
id: reset
visible: root._isAdvancedShown

View File

@ -128,4 +128,9 @@ Item {
colorScheme: root.colorScheme
notification: root.notifications.noActiveKeyForRecipient
}
NotificationDialog {
colorScheme: root.colorScheme
notification: root.notifications.genericError
}
}

View File

@ -79,7 +79,8 @@ QtObject {
root.rebuildKeychain,
root.addressChanged,
root.apiCertIssue,
root.noActiveKeyForRecipient
root.noActiveKeyForRecipient,
root.genericError
]
// Connection
@ -368,7 +369,7 @@ QtObject {
}
property Notification updateForceError: Notification {
title: qsTr("Bridge coudnt update")
title: qsTr("Bridge couldn't update")
description: qsTr("You must update manually. Go to: https://proton.me/mail/bridge#download")
brief: title
icon: "./icons/ic-exclamation-circle-filled.svg"
@ -428,7 +429,7 @@ QtObject {
}
property Notification updateSilentError: Notification {
description: qsTr("Bridge couldnt update")
description: qsTr("Bridge couldn't update")
brief: description
icon: "./icons/ic-exclamation-circle-filled.svg"
type: Notification.NotificationType.Warning
@ -1099,4 +1100,30 @@ QtObject {
}
]
}
property Notification genericError: Notification {
title: "#PlaceholderText#"
description: "#PlaceholderText#"
icon: "./icons/ic-exclamation-circle-filled.svg"
type: Notification.NotificationType.Danger
group: Notification.Groups.Connection
Connections {
target: Backend
function onGenericError(title, description) {
root.genericError.title = title
root.genericError.description = description
root.genericError.active = true;
}
}
action: [
Action {
text: qsTr("OK")
onTriggered: {
root.genericError.active = false
}
}
]
}
}