mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-16 07:06:45 +00:00
feat(GODT-3046): link in pop-up banner.
This commit is contained in:
committed by
Xavier Michelon
parent
0e5715c4e3
commit
650ad49ab0
@ -84,6 +84,7 @@ Popup {
|
|||||||
anchors.topMargin: 14
|
anchors.topMargin: 14
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
|
||||||
|
|
||||||
ColorImage {
|
ColorImage {
|
||||||
Layout.preferredHeight: 24
|
Layout.preferredHeight: 24
|
||||||
Layout.preferredWidth: 24
|
Layout.preferredWidth: 24
|
||||||
@ -108,14 +109,35 @@ Popup {
|
|||||||
sourceSize.width: 24
|
sourceSize.width: 24
|
||||||
width: 24
|
width: 24
|
||||||
}
|
}
|
||||||
Label {
|
ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignTop
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.leftMargin: 16
|
Layout.leftMargin: 16
|
||||||
color: root.colorScheme.text_invert
|
Label {
|
||||||
colorScheme: root.colorScheme
|
id: messageLabel
|
||||||
text: root.notification ? root.notification.description : ""
|
Layout.alignment: Qt.AlignTop
|
||||||
wrapMode: Text.WordWrap
|
Layout.fillWidth: true
|
||||||
|
color: root.colorScheme.text_invert
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
text: root.notification ? root.notification.description : ""
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
LinkLabel {
|
||||||
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
color: messageLabel.color
|
||||||
|
external: true
|
||||||
|
link: root.notification ? root.notification.linkUrl : ""
|
||||||
|
text: root.notification ? root.notification.linkText : ""
|
||||||
|
visible: root.notification && root.notification.linkUrl.length > 0
|
||||||
|
}
|
||||||
|
// Label {
|
||||||
|
// color: root.colorScheme.text_invert
|
||||||
|
// colorScheme: root.colorScheme
|
||||||
|
// text: "Youpi!"
|
||||||
|
// wrapMode: Text.WordWrap
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -716,7 +716,8 @@ QtObject {
|
|||||||
group: Notifications.Group.Connection
|
group: Notifications.Group.Connection
|
||||||
icon: "./icons/ic-no-connection.svg"
|
icon: "./icons/ic-no-connection.svg"
|
||||||
type: Notification.NotificationType.Danger
|
type: Notification.NotificationType.Danger
|
||||||
|
linkUrl: "https://proton.me/support/bridge"
|
||||||
|
linkText: qsTr("What happens with my messages when internet is down?")
|
||||||
Connections {
|
Connections {
|
||||||
function onInternetOff() {
|
function onInternetOff() {
|
||||||
root.noInternet.active = true;
|
root.noInternet.active = true;
|
||||||
|
|||||||
@ -22,6 +22,7 @@ RowLayout {
|
|||||||
property bool external: false
|
property bool external: false
|
||||||
property string link: "#"
|
property string link: "#"
|
||||||
property string text: ""
|
property string text: ""
|
||||||
|
property color color: colorScheme.interaction_norm
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
root.callback = null;
|
root.callback = null;
|
||||||
@ -49,9 +50,9 @@ RowLayout {
|
|||||||
id: label
|
id: label
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
|
linkColor: root.color
|
||||||
text: label.link(root.link, root.text)
|
text: label.link(root.link, root.text)
|
||||||
type: Label.LabelType.Body
|
type: Label.LabelType.Body
|
||||||
|
|
||||||
onLinkActivated: function (link) {
|
onLinkActivated: function (link) {
|
||||||
if ((link !== "#") && (link.length > 0)) {
|
if ((link !== "#") && (link.length > 0)) {
|
||||||
Qt.openUrlExternally(link);
|
Qt.openUrlExternally(link);
|
||||||
|
|||||||
Reference in New Issue
Block a user