2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
2020-06-12 20:47:44 +00:00
|
|
|
import "../imports"
|
|
|
|
import "../shared"
|
|
|
|
|
|
|
|
ModalPopup {
|
|
|
|
property var onConfirmSeedClick: function () {}
|
|
|
|
id: popup
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Add key"
|
|
|
|
title: qsTrId("add-key")
|
2020-06-12 20:47:44 +00:00
|
|
|
height: 400
|
|
|
|
|
|
|
|
onOpened: {
|
|
|
|
mnemonicTextField.text = "";
|
|
|
|
mnemonicTextField.forceActiveFocus(Qt.MouseFocusReason)
|
|
|
|
}
|
|
|
|
|
|
|
|
TextArea {
|
|
|
|
id: mnemonicTextField
|
|
|
|
height: 44
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.pixelSize: 15
|
|
|
|
placeholderText: "Enter your seed phrase here..."
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 76
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 76
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
|
|
Keys.onReturnPressed: {
|
|
|
|
submitBtn.clicked()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Enter 12, 15, 18, 21 or 24 words.\nSeperate words by a single space."
|
2020-07-07 19:25:20 +00:00
|
|
|
text: qsTrId("enter-12--15--18--21-or-24-words--nseperate-words-by-a-single-space-")
|
2020-06-12 20:47:44 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 0
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-12 20:47:44 +00:00
|
|
|
font.pixelSize: 12
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: Button {
|
|
|
|
id: submitBtn
|
|
|
|
anchors.bottom: parent.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-12 20:47:44 +00:00
|
|
|
anchors.right: parent.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.rightMargin: Style.current.padding
|
2020-06-12 20:47:44 +00:00
|
|
|
width: 44
|
|
|
|
height: 44
|
|
|
|
background: Rectangle {
|
|
|
|
radius: 50
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.lightBlue
|
2020-06-12 20:47:44 +00:00
|
|
|
}
|
|
|
|
|
2020-06-25 13:23:17 +00:00
|
|
|
SVGImage {
|
2020-06-12 20:47:44 +00:00
|
|
|
sourceSize.height: 15
|
|
|
|
sourceSize.width: 20
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
source: "../app/img/leave_chat.svg"
|
|
|
|
rotation: 180
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
}
|
|
|
|
|
|
|
|
onClicked : {
|
|
|
|
if (mnemonicTextField.text === "") {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
onConfirmSeedClick(mnemonicTextField.text)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;formeditorColor:"#ffffff";height:500;width:400}
|
|
|
|
}
|
|
|
|
##^##*/
|