2021-08-13 20:04:04 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-09-14 16:23:02 +00:00
|
|
|
import "../../../../shared"
|
2021-10-14 11:33:34 +00:00
|
|
|
import "../../../../shared/popups"
|
2021-10-14 12:14:11 +00:00
|
|
|
import "../../../../shared/panels"
|
2021-09-14 16:23:02 +00:00
|
|
|
import "../../../../shared/status"
|
2021-08-13 20:04:04 +00:00
|
|
|
import "."
|
|
|
|
|
2021-10-14 11:33:34 +00:00
|
|
|
// TODO: replace with StatusModal
|
2021-08-13 20:04:04 +00:00
|
|
|
ModalPopup {
|
|
|
|
id: signPhrasePopup
|
|
|
|
title: qsTrId("signing-phrase")
|
|
|
|
height: 390
|
|
|
|
closePolicy: Popup.NoAutoClose
|
|
|
|
|
2021-09-14 16:23:02 +00:00
|
|
|
property string signingPhraseText: ""
|
|
|
|
signal remindLaterButtonClicked()
|
|
|
|
|
2021-08-13 20:04:04 +00:00
|
|
|
Column {
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
StyledText {
|
2021-09-14 16:23:02 +00:00
|
|
|
height: (Style.current.padding * 3)
|
2021-08-13 20:04:04 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-09-14 16:23:02 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2021-08-13 20:04:04 +00:00
|
|
|
font.pixelSize: 17
|
|
|
|
font.weight: Font.Bold
|
2021-09-14 16:23:02 +00:00
|
|
|
text: qsTrId("this-is-you-signing")
|
2021-08-13 20:04:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
2021-09-14 16:23:02 +00:00
|
|
|
width: 330
|
|
|
|
height: Style.current.padding * 4
|
2021-08-13 20:04:04 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-09-14 16:23:02 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2021-08-13 20:04:04 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
wrapMode: Text.WordWrap
|
2021-09-14 16:23:02 +00:00
|
|
|
text: qsTrId("three-words-description")
|
2021-08-13 20:04:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: parent.width
|
2021-09-14 16:23:02 +00:00
|
|
|
height: 44
|
|
|
|
color: Style.current.inputBackground
|
2021-08-13 20:04:04 +00:00
|
|
|
StyledText {
|
|
|
|
id: signingPhrase
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
font.pixelSize: 15
|
2021-09-14 16:23:02 +00:00
|
|
|
text: signPhrasePopup.signingPhraseText
|
2021-08-13 20:04:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
width: parent.width
|
2021-09-14 16:23:02 +00:00
|
|
|
height: 30
|
2021-08-13 20:04:04 +00:00
|
|
|
SVGImage {
|
|
|
|
width: 13.33
|
|
|
|
height: 13.33
|
2021-09-14 16:23:02 +00:00
|
|
|
sourceSize.height: (height * 2)
|
|
|
|
sourceSize.width: (width * 2)
|
2021-08-13 20:04:04 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2021-09-28 15:04:06 +00:00
|
|
|
source: Style.svg("exclamation_outline")
|
2021-08-13 20:04:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
2021-09-14 16:23:02 +00:00
|
|
|
width: parent.width
|
|
|
|
height: 18
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-08-13 20:04:04 +00:00
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.pixelSize: 13
|
|
|
|
color: Style.current.danger
|
2021-09-14 16:23:02 +00:00
|
|
|
//% "If you see a different combination, cancel the transaction and sign out"
|
|
|
|
text: qsTrId("three-words-description-2")
|
2021-08-13 20:04:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: Item {
|
|
|
|
width: parent.width
|
|
|
|
height: btnRemindLater.height
|
|
|
|
StatusButton {
|
|
|
|
anchors.right: btnRemindLater.left
|
|
|
|
anchors.rightMargin: Style.current.padding
|
2021-09-14 16:23:02 +00:00
|
|
|
type: "secondary"
|
2021-08-13 20:04:04 +00:00
|
|
|
//% "Ok, got it"
|
|
|
|
text: qsTrId("ens-got-it")
|
|
|
|
onClicked: {
|
2021-09-14 16:23:02 +00:00
|
|
|
//TOOD improve this to not use dynamic scoping
|
2021-08-13 20:04:04 +00:00
|
|
|
appSettings.hideSignPhraseModal = true;
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
id: btnRemindLater
|
|
|
|
anchors.right: parent.right
|
|
|
|
//% "Remind me later"
|
|
|
|
text: qsTrId("remind-me-later")
|
|
|
|
onClicked: {
|
2021-09-14 16:23:02 +00:00
|
|
|
signPhrasePopup.remindLaterButtonClicked();
|
2021-08-13 20:04:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|