feat(GODT-3046): LinkLabel in notification dialog.

This commit is contained in:
Xavier Michelon 2023-10-24 15:45:24 +02:00 committed by Xavier Michelon
parent b0f1c3d4c5
commit 0e5715c4e3
3 changed files with 19 additions and 8 deletions

View File

@ -82,6 +82,17 @@ Dialog {
implicitWidth: additionalChildrenContainer.childrenRect.width
visible: children.length > 0
}
LinkLabel {
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: 32
colorScheme: root.colorScheme
external: true
link: notification.linkUrl
text: notification.linkText
visible: notification.linkUrl.length > 0
}
ColumnLayout {
spacing: 8

View File

@ -24,19 +24,17 @@ QtObject {
property list<Action> action
property bool active: false
// brief is used in status view only
property string brief
property string brief // brief is used in status view only
default property var children
property var data
// description is used in banners and in dialogs as description
property string description
property string description // description is used in banners and in dialogs as description
property bool dismissed: false
property int group
property string icon
property string linkUrl: ""
property string linkText: ""
readonly property var occurred: active ? new Date() : undefined
// title is used in dialogs only
property string title
property string title // title is used in dialogs only
property int type
onActiveChanged: {

View File

@ -104,9 +104,11 @@ QtObject {
}
property Notification apiCertIssue: Notification {
brief: qsTr("Cannot establish secure connection")
description: qsTr("Bridge cannot verify the authenticity of Proton servers on your current network due to a TLS certificate error. " + "Start Bridge again after ensuring your connection is secure and/or connecting to a VPN. Learn more about TLS pinning " + "<a href=\"https://proton.me/blog/tls-ssl-certificate#Extra-security-precautions-taken-by-ProtonMail\">here</a>.")
description: qsTr("Bridge cannot verify the authenticity of Proton servers on your current network due to a TLS certificate error. Start Bridge again after ensuring your connection is secure and/or connecting to a VPN.")
group: Notifications.Group.Dialogs | Notifications.Group.Connection
icon: "./icons/ic-exclamation-circle-filled.svg"
linkUrl: "https://proton.me/blog/tls-ssl-certificate#Extra-security-precautions-taken-by-ProtonMail"
linkText: qsTr("Learn mode about TLS pinning")
title: qsTr("Unable to establish a \nsecure connection to \nProton servers")
type: Notification.NotificationType.Danger