mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 22:06:25 +00:00
613fa4d19f
In comparison to the previous version it provides simpler API and better validation based on AmountValidator. Old version will be removed after full integration of the new version.
139 lines
3.1 KiB
QML
139 lines
3.1 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import Qt.labs.settings 1.0
|
|
|
|
import shared.popups.send.views 1.0
|
|
|
|
SplitView {
|
|
orientation: Qt.Vertical
|
|
SplitView.fillWidth: true
|
|
|
|
Item {
|
|
SplitView.fillWidth: true
|
|
SplitView.fillHeight: true
|
|
|
|
AmountToSendNew {
|
|
id: amountToSend
|
|
|
|
anchors.centerIn: parent
|
|
|
|
interactive: interactiveCheckBox.checked
|
|
markAsInvalid: markAsInvalidCheckBox.checked
|
|
|
|
caption: "Amount to send"
|
|
|
|
decimalPoint: decimalPointRadioButton.checked ? "." : ","
|
|
price: parseFloat(priceTextField.text)
|
|
|
|
multiplierIndex: multiplierIndexSpinBox.value
|
|
|
|
formatFiat: balance => `${balance.toLocaleString(Qt.locale())} USD`
|
|
formatBalance: balance => `${balance.toLocaleString(Qt.locale())} ETH`
|
|
}
|
|
}
|
|
|
|
Pane {
|
|
id: logsAndControlsPanel
|
|
|
|
SplitView.minimumHeight: 350
|
|
|
|
ColumnLayout {
|
|
spacing: 15
|
|
|
|
RowLayout {
|
|
Label {
|
|
text: "Price"
|
|
}
|
|
|
|
TextField {
|
|
id: priceTextField
|
|
|
|
text: "812.323"
|
|
}
|
|
}
|
|
|
|
RowLayout {
|
|
Label {
|
|
text: "Decimal point"
|
|
}
|
|
|
|
RadioButton {
|
|
id: decimalPointRadioButton
|
|
|
|
text: "."
|
|
}
|
|
|
|
RadioButton {
|
|
text: ","
|
|
checked: true
|
|
}
|
|
}
|
|
|
|
RowLayout {
|
|
Label {
|
|
text: "Multiplier index"
|
|
}
|
|
|
|
SpinBox {
|
|
id: multiplierIndexSpinBox
|
|
|
|
editable: true
|
|
value: 18
|
|
to: 30
|
|
}
|
|
}
|
|
|
|
RowLayout {
|
|
CheckBox {
|
|
id: interactiveCheckBox
|
|
|
|
text: "Interactive"
|
|
checked: true
|
|
}
|
|
|
|
CheckBox {
|
|
id: markAsInvalidCheckBox
|
|
|
|
text: "Mark as invalid"
|
|
}
|
|
}
|
|
|
|
Label {
|
|
font.bold: true
|
|
text: `fiat mode: ${amountToSend.fiatMode}, ` +
|
|
`valid: ${amountToSend.valid}, ` +
|
|
`empty: ${amountToSend.empty}, ` +
|
|
`amount: ${amountToSend.amount}`
|
|
}
|
|
|
|
RowLayout {
|
|
Label {
|
|
text: `Set value`
|
|
}
|
|
|
|
TextField {
|
|
id: amountTextField
|
|
|
|
text: "0.0012"
|
|
}
|
|
|
|
Button {
|
|
text: "SET"
|
|
|
|
onClicked: {
|
|
amountToSend.setValue(amountTextField.text)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Settings {
|
|
property alias multiplier: multiplierIndexSpinBox.value
|
|
}
|
|
}
|
|
|
|
// category: Components
|