WIP
This commit is contained in:
parent
a5030bdd4d
commit
b030eb923b
@ -7,6 +7,7 @@ import QtQuick 2.15
|
|||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko 1.0
|
||||||
|
import "./components/"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
visible: false
|
visible: false
|
||||||
@ -80,31 +81,15 @@ Item {
|
|||||||
text: qsTr("Failed to setup encryption: %1").arg(errorMessage)
|
text: qsTr("Failed to setup encryption: %1").arg(errorMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
Dialog {
|
MainWindowDialog {
|
||||||
id: bootstrapCrosssigning
|
id: bootstrapCrosssigning
|
||||||
|
|
||||||
parent: Overlay.overlay
|
|
||||||
anchors.centerIn: parent
|
|
||||||
height: (Math.floor(parent.height / 2) - Nheko.paddingLarge) * 2
|
|
||||||
width: (Math.floor(parent.width / 2) - Nheko.paddingLarge) * 2
|
|
||||||
padding: 0
|
|
||||||
modal: true
|
|
||||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
|
||||||
closePolicy: Popup.NoAutoClose
|
|
||||||
onAccepted: SelfVerificationStatus.setupCrosssigning(storeSecretsOnline.checked, usePassword.checked ? passwordField.text : "", useOnlineKeyBackup.checked)
|
onAccepted: SelfVerificationStatus.setupCrosssigning(storeSecretsOnline.checked, usePassword.checked ? passwordField.text : "", useOnlineKeyBackup.checked)
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
id: scroll
|
|
||||||
|
|
||||||
clip: true
|
|
||||||
anchors.fill: parent
|
|
||||||
ScrollBar.horizontal.visible: false
|
|
||||||
ScrollBar.vertical.visible: true
|
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
id: grid
|
id: grid
|
||||||
|
|
||||||
width: scroll.width - scroll.ScrollBar.vertical.width
|
width: bootstrapCrosssigning.useableWidth
|
||||||
columns: 2
|
columns: 2
|
||||||
rowSpacing: 0
|
rowSpacing: 0
|
||||||
columnSpacing: 0
|
columnSpacing: 0
|
||||||
@ -222,7 +207,6 @@ Item {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: Nheko.colors.window
|
color: Nheko.colors.window
|
||||||
@ -233,11 +217,28 @@ Item {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MainWindowDialog {
|
||||||
|
id: verifyMasterKey
|
||||||
|
|
||||||
|
onAccepted: SelfVerificationStatus.verifyMasterKey()
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
id: masterGrid
|
||||||
|
|
||||||
|
width: verifyMasterKey.useableWidth
|
||||||
|
columns: 2
|
||||||
|
rowSpacing: 0
|
||||||
|
columnSpacing: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onStatusChanged() {
|
function onStatusChanged() {
|
||||||
console.log("STATUS CHANGED: " + SelfVerificationStatus.status);
|
console.log("STATUS CHANGED: " + SelfVerificationStatus.status);
|
||||||
if (SelfVerificationStatus.status == SelfVerificationStatus.NoMasterKey)
|
if (SelfVerificationStatus.status == SelfVerificationStatus.NoMasterKey)
|
||||||
bootstrapCrosssigning.open();
|
bootstrapCrosssigning.open();
|
||||||
|
else if (SelfVerificationStatus.status == SelfVerificationStatus.UnverifiedMasterKey)
|
||||||
|
verifyMasterKey.open();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
42
resources/qml/components/MainWindowDialog.qml
Normal file
42
resources/qml/components/MainWindowDialog.qml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
import Qt.labs.platform 1.1 as P
|
||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import im.nheko 1.0
|
||||||
|
|
||||||
|
Dialog {
|
||||||
|
parent: Overlay.overlay
|
||||||
|
anchors.centerIn: parent
|
||||||
|
height: (Math.floor(parent.height / 2) - Nheko.paddingLarge) * 2
|
||||||
|
width: (Math.floor(parent.width / 2) - Nheko.paddingLarge) * 2
|
||||||
|
padding: 0
|
||||||
|
modal: true
|
||||||
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||||
|
closePolicy: Popup.NoAutoClose
|
||||||
|
|
||||||
|
default property alias inner: scroll.data
|
||||||
|
property int useableWidth: scroll.width - scroll.ScrollBar.vertical.width
|
||||||
|
|
||||||
|
contentChildren: [
|
||||||
|
ScrollView {
|
||||||
|
id: scroll
|
||||||
|
|
||||||
|
clip: true
|
||||||
|
anchors.fill: parent
|
||||||
|
ScrollBar.horizontal.visible: false
|
||||||
|
ScrollBar.vertical.visible: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: Nheko.colors.window
|
||||||
|
border.color: Nheko.theme.separator
|
||||||
|
border.width: 1
|
||||||
|
radius: Nheko.paddingSmall
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -145,6 +145,7 @@
|
|||||||
<file>qml/components/AdaptiveLayoutElement.qml</file>
|
<file>qml/components/AdaptiveLayoutElement.qml</file>
|
||||||
<file>qml/components/AvatarListTile.qml</file>
|
<file>qml/components/AvatarListTile.qml</file>
|
||||||
<file>qml/components/FlatButton.qml</file>
|
<file>qml/components/FlatButton.qml</file>
|
||||||
|
<file>qml/components/MainWindowDialog.qml</file>
|
||||||
<file>qml/delegates/Encrypted.qml</file>
|
<file>qml/delegates/Encrypted.qml</file>
|
||||||
<file>qml/delegates/FileMessage.qml</file>
|
<file>qml/delegates/FileMessage.qml</file>
|
||||||
<file>qml/delegates/ImageMessage.qml</file>
|
<file>qml/delegates/ImageMessage.qml</file>
|
||||||
|
Loading…
Reference in New Issue
Block a user