summary refs log tree commit diff
path: root/resources/qml/delegates/EncryptionEnabled.qml
blob: 0e2b7fc03973551d8de286a23c2b54e35f7ea231 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// SPDX-FileCopyrightText: Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

import ".."
import QtQuick 2.15
import QtQuick.Layouts 1.15
import im.nheko 1.0

Rectangle {
    id: r

    required property string username

    radius: fontMetrics.lineSpacing / 2 + Nheko.paddingMedium
    width: parent.width ? Math.min(parent.width, 700) : 0
    height: contents.implicitHeight + Nheko.paddingMedium * 2
    color: palette.alternateBase
    border.color: Nheko.theme.green
    border.width: 2

    RowLayout {
        id: contents

        anchors.fill: parent
        anchors.margins: Nheko.paddingMedium
        spacing: Nheko.paddingMedium

        Image {
            source: "image://colorimage/:/icons/icons/ui/shield-filled-checkmark.svg?" + Nheko.theme.green
            Layout.alignment: Qt.AlignVCenter
            Layout.preferredWidth: 24
            Layout.preferredHeight: 24
        }

        Column {
            spacing: Nheko.paddingSmall
            Layout.fillWidth: true

            MatrixText {
                text: qsTr("%1 enabled end-to-end encryption").arg(r.username)
                font.bold: true
                font.pointSize: 14
                color: palette.text
                width: parent.width
            }

            MatrixText {
                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.")
                color: palette.text
                width: parent.width
            }

        }

    }

}