2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
2020-08-13 08:24:51 +00:00
|
|
|
import QtQuick.Layouts 1.13
|
2020-05-27 20:50:39 +00:00
|
|
|
import "../../../imports"
|
|
|
|
import "../../../shared"
|
2020-06-04 20:56:44 +00:00
|
|
|
import "./components"
|
2020-05-27 20:50:39 +00:00
|
|
|
|
2020-06-26 16:08:51 +00:00
|
|
|
ModalPopup {
|
|
|
|
id: popup
|
|
|
|
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Send"
|
|
|
|
title: qsTrId("command-button-send")
|
2020-08-13 08:24:51 +00:00
|
|
|
height: 700
|
2020-06-26 16:08:51 +00:00
|
|
|
|
|
|
|
onOpened: {
|
2020-08-13 08:24:51 +00:00
|
|
|
sendModalContent.amountInput.selectedAmount = ""
|
2020-07-01 14:24:07 +00:00
|
|
|
sendModalContent.passwordInput.text = ""
|
2020-06-26 16:08:51 +00:00
|
|
|
sendModalContent.amountInput.forceActiveFocus(Qt.MouseFocusReason)
|
2020-05-27 20:50:39 +00:00
|
|
|
}
|
|
|
|
|
2020-06-26 16:08:51 +00:00
|
|
|
SendModalContent {
|
|
|
|
id: sendModalContent
|
2020-07-01 14:24:07 +00:00
|
|
|
closePopup: function () {
|
|
|
|
popup.close()
|
|
|
|
}
|
2020-05-27 20:50:39 +00:00
|
|
|
}
|
|
|
|
|
2020-08-13 08:24:51 +00:00
|
|
|
footer: Item {
|
2020-06-26 16:08:51 +00:00
|
|
|
anchors.top: parent.top
|
2020-08-13 08:24:51 +00:00
|
|
|
anchors.left: parent.left
|
2020-06-26 16:08:51 +00:00
|
|
|
anchors.right: parent.right
|
2020-08-13 08:24:51 +00:00
|
|
|
StyledButton {
|
|
|
|
id: btnBack
|
|
|
|
anchors.left: parent.left
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Back"
|
|
|
|
label: qsTrId("back")
|
2020-08-13 08:24:51 +00:00
|
|
|
visible: !btnPreview.visible
|
|
|
|
onClicked: {
|
|
|
|
btnPreview.visible = true
|
|
|
|
sendModalContent.showInputs()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StyledButton {
|
|
|
|
id: btnPreview
|
|
|
|
anchors.right: parent.right
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Preview"
|
|
|
|
label: qsTrId("preview")
|
2020-08-13 08:24:51 +00:00
|
|
|
onClicked: {
|
|
|
|
if (!sendModalContent.validate()) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
visible = false
|
|
|
|
sendModalContent.showPreview()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StyledButton {
|
|
|
|
id: btnSend
|
|
|
|
anchors.right: parent.right
|
|
|
|
visible: !btnPreview.visible
|
|
|
|
//% "Send"
|
2020-08-19 15:29:42 +00:00
|
|
|
label: qsTrId("command-button-send") + " " + sendModalContent.amountInput.selectedAmount + " " + sendModalContent.amountInput.selectedAsset.symbol
|
2020-08-13 08:24:51 +00:00
|
|
|
onClicked: {
|
2020-08-19 15:29:42 +00:00
|
|
|
if (!sendModalContent.validatePassword()) {
|
|
|
|
return
|
|
|
|
}
|
2020-08-13 08:24:51 +00:00
|
|
|
sendModalContent.send()
|
|
|
|
}
|
2020-05-27 20:50:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;autoSize:true;height:480;width:640}
|
|
|
|
}
|
|
|
|
##^##*/
|
2020-05-29 15:43:37 +00:00
|
|
|
|