Fix device verification colors

This commit is contained in:
Nicolas Werner 2022-01-12 06:44:51 +01:00
parent 39bf20baed
commit 41a9577201
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
8 changed files with 46 additions and 67 deletions

View File

@ -1,53 +0,0 @@
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
import "../ui"
import QtQuick 2.3
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.10
import im.nheko 1.0
Pane {
property string title: qsTr("Awaiting Confirmation")
ColumnLayout {
spacing: 16
Label {
id: content
Layout.maximumWidth: 400
Layout.fillHeight: true
Layout.fillWidth: true
wrapMode: Text.Wrap
text: qsTr("Waiting for other side to complete verification.")
color: Nheko.colors.text
verticalAlignment: Text.AlignVCenter
}
Spinner {
Layout.alignment: Qt.AlignHCenter
foreground: Nheko.colors.mid
}
RowLayout {
Button {
Layout.alignment: Qt.AlignLeft
text: qsTr("Cancel")
onClicked: {
flow.cancel();
dialog.close();
}
}
Item {
Layout.fillWidth: true
}
}
}
}

View File

@ -14,10 +14,11 @@ ApplicationWindow {
property var flow
onClosing: VerificationManager.removeVerificationFlow(flow)
title: stack.currentItem.title
title: stack.currentItem.title_
modality: Qt.NonModal
palette: Nheko.colors
height: stack.implicitHeight
color: Nheko.colors.window
minimumHeight: stack.implicitHeight
width: stack.implicitWidth
flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
Component.onCompleted: Nheko.reparent(dialog)
@ -25,6 +26,7 @@ ApplicationWindow {
StackView {
id: stack
anchors.fill: parent
initialItem: newVerificationRequest
implicitWidth: currentItem.implicitWidth
implicitHeight: currentItem.implicitHeight

View File

@ -10,13 +10,16 @@ import im.nheko 1.0
Pane {
property string title: qsTr("Verification Code")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout {
anchors.fill: parent
spacing: 16
Label {
Layout.maximumWidth: 400
Layout.fillHeight: true
Layout.preferredWidth: 400
Layout.fillWidth: true
wrapMode: Text.Wrap
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!")
@ -24,6 +27,7 @@ Pane {
verticalAlignment: Text.AlignVCenter
}
Item { Layout.fillHeight: true; }
RowLayout {
Layout.alignment: Qt.AlignHCenter
@ -46,6 +50,7 @@ Pane {
}
}
Item { Layout.fillHeight: true; }
RowLayout {
Button {

View File

@ -10,13 +10,16 @@ import im.nheko 1.0
Pane {
property string title: qsTr("Verification Code")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout {
anchors.fill: parent
spacing: 16
Label {
Layout.maximumWidth: 400
Layout.fillHeight: true
Layout.preferredWidth: 400
Layout.fillWidth: true
wrapMode: Text.Wrap
text: qsTr("Please verify the following emoji. You should see the same emoji on both sides. If they differ, please press 'They do not match!' to abort verification!")
@ -24,6 +27,7 @@ Pane {
verticalAlignment: Text.AlignVCenter
}
Item { Layout.fillHeight: true; }
RowLayout {
id: emojis
@ -391,6 +395,7 @@ Pane {
}
}
Item { Layout.fillHeight: true; }
RowLayout {
Button {

View File

@ -10,15 +10,18 @@ import im.nheko 1.0
Pane {
property string title: qsTr("Verification failed")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout {
anchors.fill: parent
spacing: 16
Text {
id: content
Layout.maximumWidth: 400
Layout.fillHeight: true
Layout.preferredWidth: 400
Layout.fillWidth: true
wrapMode: Text.Wrap
text: {
@ -43,6 +46,8 @@ Pane {
verticalAlignment: Text.AlignVCenter
}
Item { Layout.fillHeight: true; }
RowLayout {
Item {
Layout.fillWidth: true

View File

@ -10,15 +10,18 @@ import im.nheko 1.0
Pane {
property string title: flow.sender ? qsTr("Send Verification Request") : qsTr("Received Verification Request")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout {
anchors.fill: parent
spacing: 16
Label {
// Self verification
Layout.maximumWidth: 400
Layout.fillHeight: true
Layout.preferredWidth: 400
Layout.fillWidth: true
wrapMode: Text.Wrap
text: {
@ -43,6 +46,8 @@ Pane {
verticalAlignment: Text.AlignVCenter
}
Item { Layout.fillHeight: true; }
RowLayout {
Button {
Layout.alignment: Qt.AlignLeft

View File

@ -10,15 +10,18 @@ import im.nheko 1.0
Pane {
property string title: qsTr("Successful Verification")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout {
anchors.fill: parent
spacing: 16
Label {
id: content
Layout.maximumWidth: 400
Layout.fillHeight: true
Layout.preferredWidth: 400
Layout.fillWidth: true
wrapMode: Text.Wrap
text: qsTr("Verification successful! Both sides verified their devices!")
@ -26,6 +29,8 @@ Pane {
verticalAlignment: Text.AlignVCenter
}
Item { Layout.fillHeight: true; }
RowLayout {
Item {
Layout.fillWidth: true

View File

@ -11,15 +11,18 @@ import im.nheko 1.0
Pane {
property string title: qsTr("Waiting for other party…")
background: Rectangle {
color: Nheko.colors.window
}
ColumnLayout {
anchors.fill: parent
spacing: 16
Label {
id: content
Layout.maximumWidth: 400
Layout.fillHeight: true
Layout.preferredWidth: 400
Layout.fillWidth: true
wrapMode: Text.Wrap
text: {
@ -36,10 +39,12 @@ Pane {
verticalAlignment: Text.AlignVCenter
}
Item { Layout.fillHeight: true; }
Spinner {
Layout.alignment: Qt.AlignHCenter
foreground: Nheko.colors.mid
}
Item { Layout.fillHeight: true; }
RowLayout {
Button {