emizzle 3dac87df3d feat/tx-comps: Add TransactionPreview component
Adds a TransactionPreview component as per the spec https://www.notion.so/emizzle/Wallet-transaction-components-2003b78a8d0d41c4ab3d21eb2496fb20

- update ReceiveModal dropdown to match design
- long alias and account name support
- long name support in account selector
- strip all trailing zeros from displayed balances
2020-08-19 14:38:45 -04:00

71 lines
1.8 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import "../../../imports"
import "../../../shared"
ModalPopup {
property string address: ""
id: popup
title: qsTr("Receive")
height: 500
width: 500
Rectangle {
id: qrCodeBox
height: 240
width: 240
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
radius: Style.current.radius
border.width: 1
border.color: Style.current.border
Image {
id: qrCodeImage
asynchronous: true
fillMode: Image.PreserveAspectFit
source: profileModel.qrCode(accountSelector.selectedAccount.address)
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
height: parent.height - Style.current.padding
width: parent.width - Style.current.padding
mipmap: true
smooth: false
}
}
AccountSelector {
id: accountSelector
label: ""
showAccountDetails: false
accounts: walletModel.accounts
currency: walletModel.defaultCurrency
anchors.top: qrCodeBox.bottom
anchors.topMargin: Style.current.padding
anchors.horizontalCenter: parent.horizontalCenter
width: 240
dropdownWidth: parent.width - (Style.current.padding * 2)
dropdownAlignment: Select.MenuAlignment.Center
}
Input {
label: qsTr("Wallet address")
text: accountSelector.selectedAccount.address
anchors.top: accountSelector.bottom
anchors.topMargin: Style.current.padding
copyToClipboard: true
textField.readOnly: true
customHeight: 56
}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/