forked from Silverfish/proton-bridge
feat(GODT-3046): LinkLabel in notification dialog.
This commit is contained in:
committed by
Xavier Michelon
parent
b0f1c3d4c5
commit
0e5715c4e3
@ -82,6 +82,17 @@ Dialog {
|
|||||||
implicitWidth: additionalChildrenContainer.childrenRect.width
|
implicitWidth: additionalChildrenContainer.childrenRect.width
|
||||||
visible: children.length > 0
|
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 {
|
ColumnLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
|
||||||
|
|||||||
@ -24,19 +24,17 @@ QtObject {
|
|||||||
|
|
||||||
property list<Action> action
|
property list<Action> action
|
||||||
property bool active: false
|
property bool active: false
|
||||||
// brief is used in status view only
|
property string brief // brief is used in status view only
|
||||||
property string brief
|
|
||||||
default property var children
|
default property var children
|
||||||
property var data
|
property var data
|
||||||
// description is used in banners and in dialogs as description
|
property string description // description is used in banners and in dialogs as description
|
||||||
property string description
|
|
||||||
property bool dismissed: false
|
property bool dismissed: false
|
||||||
property int group
|
property int group
|
||||||
property string icon
|
property string icon
|
||||||
|
property string linkUrl: ""
|
||||||
|
property string linkText: ""
|
||||||
readonly property var occurred: active ? new Date() : undefined
|
readonly property var occurred: active ? new Date() : undefined
|
||||||
|
property string title // title is used in dialogs only
|
||||||
// title is used in dialogs only
|
|
||||||
property string title
|
|
||||||
property int type
|
property int type
|
||||||
|
|
||||||
onActiveChanged: {
|
onActiveChanged: {
|
||||||
|
|||||||
@ -104,9 +104,11 @@ QtObject {
|
|||||||
}
|
}
|
||||||
property Notification apiCertIssue: Notification {
|
property Notification apiCertIssue: Notification {
|
||||||
brief: qsTr("Cannot establish secure connection")
|
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
|
group: Notifications.Group.Dialogs | Notifications.Group.Connection
|
||||||
icon: "./icons/ic-exclamation-circle-filled.svg"
|
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")
|
title: qsTr("Unable to establish a \nsecure connection to \nProton servers")
|
||||||
type: Notification.NotificationType.Danger
|
type: Notification.NotificationType.Danger
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user