2023-02-22 01:48:49 +03:00
// SPDX-FileCopyrightText: Nheko Contributors
2023-02-12 05:40:07 +03:00
//
// SPDX-License-Identifier: GPL-3.0-or-later
import ".."
2023-08-13 12:30:41 +03:00
import QtQuick
import QtQuick . Controls
import QtQuick . Layouts
import im . nheko
2023-02-12 05:40:07 +03:00
2023-08-13 12:30:41 +03:00
Control {
2023-02-12 05:40:07 +03:00
id: r
2023-08-13 12:30:41 +03:00
required property string userName
2023-02-12 05:40:07 +03:00
2023-08-13 12:30:41 +03:00
padding: Nheko . paddingMedium
//implicitHeight: contents.implicitHeight + padd * 2
Layout.maximumWidth: contents . Layout . maximumWidth + padding * 2
Layout.fillWidth: true
2023-02-12 05:40:07 +03:00
2023-08-13 12:30:41 +03:00
contentItem: RowLayout {
2023-02-12 05:40:07 +03:00
id: contents
spacing: Nheko . paddingMedium
Image {
source: "image://colorimage/:/icons/icons/ui/shield-filled-checkmark.svg?" + Nheko . theme . green
Layout.alignment: Qt . AlignVCenter
2023-06-19 21:45:57 +03:00
Layout.preferredWidth: 24
Layout.preferredHeight: 24
2023-02-12 05:40:07 +03:00
}
2023-08-13 12:30:41 +03:00
ColumnLayout {
2023-02-12 05:40:07 +03:00
spacing: Nheko . paddingSmall
Layout.fillWidth: true
MatrixText {
2023-08-13 12:30:41 +03:00
text: qsTr ( "%1 enabled end-to-end encryption" ) . arg ( r . userName )
2023-02-12 05:40:07 +03:00
font.bold: true
font.pointSize: 14
2023-06-02 02:29:05 +03:00
color: palette . text
2023-08-13 12:30:41 +03:00
Layout.fillWidth: true
Layout.maximumWidth: implicitWidth + 1
2023-02-12 05:40:07 +03:00
}
2023-08-13 12:30:41 +03:00
Label {
2023-02-14 20:44:26 +03:00
text: qsTr ( "Encryption keeps your messages safe by only allowing the people you sent the message to to read it. For extra security, if you want to make sure you are talking to the right people, you can verify them in real life." )
2023-08-13 12:30:41 +03:00
textFormat: Text . PlainText
wrapMode: Label . WordWrap
Layout.fillWidth: true
Layout.maximumWidth: implicitWidth + 1
2023-02-12 05:40:07 +03:00
}
}
}
2023-08-13 12:30:41 +03:00
background: Rectangle {
radius: fontMetrics . lineSpacing / 2 + Nheko . paddingMedium
height: contents . implicitHeight + Nheko . paddingMedium * 2
color: palette . alternateBase
border.color: Nheko . theme . green
border.width: 2
}
2023-02-12 05:40:07 +03:00
}