2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
//import QtQuick.Layouts 1.13
|
|
|
|
//import Qt.labs.platform 1.1
|
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
|
|
|
|
|
|
|
|
title: qsTr("Send")
|
2020-06-29 16:37:36 +00:00
|
|
|
height: 600
|
2020-06-26 16:08:51 +00:00
|
|
|
|
|
|
|
onOpened: {
|
|
|
|
sendModalContent.amountInput.text = ""
|
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-06-26 19:43:20 +00:00
|
|
|
const accounts = walletModel.accounts
|
|
|
|
const numAccounts = accounts.rowCount()
|
|
|
|
const accountsData = []
|
|
|
|
for (let i = 0; i < numAccounts; i++) {
|
|
|
|
accountsData.push({
|
|
|
|
name: accounts.rowData(i, 'name'),
|
|
|
|
address: accounts.rowData(i, 'address'),
|
|
|
|
iconColor: accounts.rowData(i, 'iconColor')
|
|
|
|
})
|
|
|
|
}
|
|
|
|
sendModalContent.accounts = accountsData
|
2020-06-29 16:37:36 +00:00
|
|
|
|
|
|
|
const assets = walletModel.assets
|
|
|
|
const numAssets = assets.rowCount()
|
|
|
|
const assetsData = []
|
|
|
|
for (let f = 0; f < numAssets; f++) {
|
|
|
|
assetsData.push({
|
|
|
|
name: assets.rowData(f, 'name'),
|
|
|
|
symbol: assets.rowData(f, 'symbol'),
|
2020-07-01 14:04:45 +00:00
|
|
|
value: assets.rowData(f, 'value'),
|
|
|
|
address: assets.rowData(f, 'address')
|
2020-06-29 16:37:36 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
sendModalContent.assets = assetsData
|
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-06-26 16:08:51 +00:00
|
|
|
footer: StyledButton {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.right: parent.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.rightMargin: Style.current.padding
|
2020-06-26 16:08:51 +00:00
|
|
|
label: qsTr("Send")
|
|
|
|
|
|
|
|
onClicked: {
|
2020-06-29 17:05:34 +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
|
|
|
|