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-08-13 20:04:04 +00:00
|
|
|
|
2021-10-18 09:52:05 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
|
|
|
StatusModal {
|
2021-08-13 20:04:04 +00:00
|
|
|
id: signPhrasePopup
|
2021-10-18 09:52:05 +00:00
|
|
|
anchors.centerIn: parent
|
2021-08-13 20:04:04 +00:00
|
|
|
height: 390
|
|
|
|
closePolicy: Popup.NoAutoClose
|
|
|
|
|
2021-10-18 09:52:05 +00:00
|
|
|
header.title: qsTrId("signing-phrase")
|
2021-09-14 16:23:02 +00:00
|
|
|
property string signingPhraseText: ""
|
|
|
|
signal remindLaterButtonClicked()
|
|
|
|
|
2021-10-18 09:52:05 +00:00
|
|
|
contentItem: Item {
|
|
|
|
width: signPhrasePopup.width
|
|
|
|
height: childrenRect.height
|
|
|
|
Column {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 16
|
|
|
|
width: parent.width - 32
|
2021-08-13 20:04:04 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
2021-10-18 09:52:05 +00:00
|
|
|
StatusBaseText {
|
|
|
|
height: (Style.current.padding * 3)
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.pixelSize: 17
|
|
|
|
font.weight: Font.Bold
|
|
|
|
text: qsTrId("this-is-you-signing")
|
|
|
|
}
|
2021-08-13 20:04:04 +00:00
|
|
|
|
2021-10-18 09:52:05 +00:00
|
|
|
StatusBaseText {
|
|
|
|
width: 330
|
|
|
|
height: Style.current.padding * 4
|
2021-08-13 20:04:04 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-10-18 09:52:05 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2021-08-13 20:04:04 +00:00
|
|
|
font.pixelSize: 15
|
2021-10-18 09:52:05 +00:00
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: qsTrId("three-words-description")
|
2021-08-13 20:04:04 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 09:52:05 +00:00
|
|
|
Rectangle {
|
|
|
|
width: parent.width
|
|
|
|
height: 44
|
|
|
|
color: Theme.palette.baseColor2
|
|
|
|
StatusBaseText {
|
|
|
|
id: signingPhrase
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
font.pixelSize: 15
|
|
|
|
text: signPhrasePopup.signingPhraseText
|
|
|
|
}
|
2021-08-13 20:04:04 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 09:52:05 +00:00
|
|
|
Item {
|
|
|
|
width: parent.width
|
|
|
|
height: 30
|
|
|
|
StatusIcon {
|
|
|
|
icon: "warning"
|
|
|
|
width: 13.33
|
|
|
|
height: 13.33
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
width: parent.width
|
|
|
|
height: 18
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.pixelSize: 13
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
//% "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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-18 09:52:05 +00:00
|
|
|
rightButtons: [
|
|
|
|
StatusFlatButton {
|
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-10-20 09:50:50 +00:00
|
|
|
localAccountSensitiveSettings.hideSignPhraseModal = true;
|
2021-08-13 20:04:04 +00:00
|
|
|
close();
|
|
|
|
}
|
2021-10-18 09:52:05 +00:00
|
|
|
},
|
2021-08-13 20:04:04 +00:00
|
|
|
StatusButton {
|
|
|
|
//% "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
|
|
|
}
|
|
|
|
}
|
2021-10-18 09:52:05 +00:00
|
|
|
]
|
2021-08-13 20:04:04 +00:00
|
|
|
}
|