Warning, /network/neochat/src/qml/ConfirmEncryptionDialog.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
0002 // SPDX-FileCopyrightText: 2022 Tobias Fella <tobias.fella@kde.org>
0003 // SPDX-License-Identifier: GPL-2.0-or-later
0004 
0005 import QtQuick
0006 import QtQuick.Controls as QQC2
0007 import QtQuick.Layouts
0008 import org.kde.kirigami as Kirigami
0009 
0010 import org.kde.neochat
0011 
0012 QQC2.Dialog {
0013     id: root
0014 
0015     property NeoChatRoom room
0016 
0017     ColumnLayout {
0018         Kirigami.Heading {
0019             text: i18n("Activate Encryption")
0020         }
0021         QQC2.Label {
0022             text: i18n("It will not be possible to deactivate the encryption after it is enabled.")
0023         }
0024     }
0025 
0026     x: Math.round((parent.width - width) / 2)
0027     y: Math.round((parent.height - height) / 2)
0028     modal: true
0029 
0030     footer: QQC2.DialogButtonBox {
0031         QQC2.Button {
0032             text: i18n("Cancel")
0033             QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.RejectRole
0034             onClicked: root.close()
0035         }
0036 
0037         QQC2.Button {
0038             text: i18n("Activate Encryption")
0039             QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
0040             onClicked: {
0041                 root.room.activateEncryption();
0042                 root.close();
0043             }
0044         }
0045     }
0046 }