Debian Codegraph @

resources/qml/device-verification/DigitVerification.qml

raw
1 // SPDX-FileCopyrightText: Nheko Contributors
2 //
3 // SPDX-License-Identifier: GPL-3.0-or-later
4
5 import QtQuick 2.3
6 import QtQuick.Controls 2.3
7 import QtQuick.Layouts 1.10
8
9 ColumnLayout {
10 property string title: qsTr("Verification Code")
11
12 spacing: 16
13
14 Label {
15 Layout.preferredWidth: 400
16 Layout.fillWidth: true
17 wrapMode: Text.Wrap
18 text: qsTr("Please verify the following digits. You should see the same numbers on both sides. If they differ, please press 'They do not match!' to abort verification!")
19 color: palette.text
20 verticalAlignment: Text.AlignVCenter
21 }
22
23 Item { Layout.fillHeight: true; }
24 RowLayout {
25 Layout.alignment: Qt.AlignHCenter
26
27 Label {
28 font.pixelSize: Qt.application.font.pixelSize * 2
29 text: flow.sasList[0]
30 color: palette.text
31 }
32
33 Label {
34 font.pixelSize: Qt.application.font.pixelSize * 2
35 text: flow.sasList[1]
36 color: palette.text
37 }
38
39 Label {
40 font.pixelSize: Qt.application.font.pixelSize * 2
41 text: flow.sasList[2]
42 color: palette.text
43 }
44
45 }
46 Item { Layout.fillHeight: true; }
47
48 RowLayout {
49 Button {
50 Layout.alignment: Qt.AlignLeft
51 text: qsTr("They do not match!")
52 onClicked: {
53 flow.cancel();
54 dialog.close();
55 }
56 }
57
58 Item {
59 Layout.fillWidth: true
60 }
61
62 Button {
63 Layout.alignment: Qt.AlignRight
64 text: qsTr("They match!")
65 onClicked: flow.next()
66 }
67
68 }
69
70 }