Skip to content
Snippets Groups Projects
Unverified Commit 009d1a8e authored by Nicolas Werner's avatar Nicolas Werner Committed by GitHub
Browse files

Merge pull request #1359 from Nheko-Reborn/encryption_delegate

Add a fancy delegate when encryption is enabled
parents 2a28b3a3 92d95398
No related branches found
No related tags found
No related merge requests found
Pipeline #4334 failed
// SPDX-FileCopyrightText: 2023 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
import ".."
import QtQuick 2.15
import QtQuick.Controls 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
anchors.horizontalCenter: parent.horizontalCenter
height: contents.implicitHeight + Nheko.paddingMedium * 2
color: Nheko.colors.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
width: 24
height: width
}
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: Nheko.colors.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: Nheko.colors.text
width: parent.width
}
}
}
}
......@@ -253,9 +253,8 @@ Item {
DelegateChoice {
roleValue: MtxEvent.Encryption
Pill {
text: qsTr("%1 enabled encryption").arg(d.userName)
isStateEvent: d.isStateEvent
EncryptionEnabled {
username: d.userName
}
}
......
......@@ -196,6 +196,7 @@
<file>qml/voip/ScreenShare.qml</file>
<file>qml/voip/VideoCall.qml</file>
<file>confettiparticle.svg</file>
<file>qml/delegates/EncryptionEnabled.qml</file>
</qresource>
<qresource prefix="/media">
<file>media/ring.ogg</file>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment