2020-06-22 11:43:34 +00:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.3
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import "../../../../imports"
|
|
|
|
import "../../../../shared"
|
|
|
|
|
|
|
|
ModalPopup {
|
|
|
|
id: popup
|
|
|
|
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Write down your seed phrase"
|
|
|
|
title: qsTrId("write-down-your-seed-phrase")
|
2020-06-22 11:43:34 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
|
|
|
|
id: seed
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
width: parent.width
|
|
|
|
height: children[0].height
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: wrapper
|
|
|
|
property int len: profileModel.mnemonic.split(" ").length
|
|
|
|
anchors.top: parent.top
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-22 11:43:34 +00:00
|
|
|
height: 40*(len/2)
|
|
|
|
width: 350
|
|
|
|
border.width: 1
|
2020-07-02 15:14:31 +00:00
|
|
|
border.color: Style.current.grey
|
|
|
|
radius: Style.current.radius
|
2020-06-22 11:43:34 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: profileModel.mnemonic.split(" ")
|
|
|
|
Rectangle {
|
|
|
|
id: word
|
|
|
|
height: 40
|
|
|
|
width: 175
|
|
|
|
color: "transparent"
|
|
|
|
anchors.top: (index == 0 || index == (wrapper.len/2)) ? parent.top : parent.children[index-1].bottom
|
|
|
|
anchors.left: (index < (wrapper.len/2)) ? parent.left : undefined
|
|
|
|
anchors.right: (index >= wrapper.len/2) ? parent.right : undefined
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 1
|
|
|
|
height: parent.height
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 175
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.grey
|
2020-06-22 11:43:34 +00:00
|
|
|
visible: index >= wrapper.len/2
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: count
|
|
|
|
text: index+1
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-22 11:43:34 +00:00
|
|
|
anchors.bottom: parent.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.bottomMargin: Style.current.smallPadding
|
2020-06-22 11:43:34 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.bigPadding
|
2020-06-22 11:43:34 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
|
|
|
|
TextEdit {
|
|
|
|
text: modelData
|
|
|
|
font.pixelSize: 15
|
|
|
|
anchors.bottom: parent.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.bottomMargin: Style.current.smallPadding
|
2020-06-22 11:43:34 +00:00
|
|
|
anchors.left: count.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.padding
|
2020-06-22 11:43:34 +00:00
|
|
|
selectByMouse: true
|
|
|
|
readOnly: true
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: confirmationsInfo
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "With this 12 words you can always get your key back. Write it down. Keep it safe, offline, and separate from this device."
|
|
|
|
text: qsTrId("with-this-12-words-you-can-always-get-your-key-back.-write-it-down.-keep-it-safe,-offline,-and-separate-from-this-device.")
|
2020-06-22 11:43:34 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-22 11:43:34 +00:00
|
|
|
anchors.bottom: parent.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.bottomMargin: Style.current.padding
|
2020-06-22 11:43:34 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-06-22 11:43:34 +00:00
|
|
|
anchors.right: parent.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.rightMargin: Style.current.smallPadding
|
2020-06-22 11:43:34 +00:00
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: StyledButton {
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Done"
|
|
|
|
label: qsTrId("done")
|
2020-06-22 11:43:34 +00:00
|
|
|
anchors.right: parent.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.rightMargin: Style.current.smallPadding
|
2020-06-22 11:43:34 +00:00
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
onClicked: {
|
|
|
|
backupSeedModal.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|