aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-12 16:06:02 +0800
committerobscuren <geffobscura@gmail.com>2014-06-12 16:06:02 +0800
commite7a22af0e633db4da3d81f1ad07126ea3b06f891 (patch)
tree155cf0cdc5835a499856cadd48bd5c182fa1145b /ethereal
parent1d300bbc108f9d404d2eb5cbc8990042c0129f04 (diff)
downloaddexon-e7a22af0e633db4da3d81f1ad07126ea3b06f891.tar.gz
dexon-e7a22af0e633db4da3d81f1ad07126ea3b06f891.tar.zst
dexon-e7a22af0e633db4da3d81f1ad07126ea3b06f891.zip
Minor UI adjustments
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/qml/wallet.qml49
-rw-r--r--ethereal/ui/gui.go2
2 files changed, 40 insertions, 11 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index 0555cd2f2..0e065caa4 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -768,6 +768,20 @@ ApplicationWindow {
anchors.leftMargin: 5
anchors.topMargin: 5
+ ListModel {
+ id: denomModel
+ ListElement { text: "Wei" ; zeros: "" }
+ ListElement { text: "Ada" ; zeros: "000" }
+ ListElement { text: "Babbage" ; zeros: "000000" }
+ ListElement { text: "Shannon" ; zeros: "000000000" }
+ ListElement { text: "Szabo" ; zeros: "000000000000" }
+ ListElement { text: "Finney" ; zeros: "000000000000000" }
+ ListElement { text: "Ether" ; zeros: "000000000000000000" }
+ ListElement { text: "Einstein" ;zeros: "000000000000000000000" }
+ ListElement { text: "Douglas" ; zeros: "000000000000000000000000000000000000000000" }
+ }
+
+
TextField {
id: txFuelRecipient
placeholderText: "Address / Name or empty for contract"
@@ -775,13 +789,21 @@ ApplicationWindow {
width: 400
}
- TextField {
- id: txValue
- width: 222
- placeholderText: "Amount"
- validator: RegExpValidator { regExp: /\d*/ }
- onTextChanged: {
- contractFormReady()
+ RowLayout {
+ TextField {
+ id: txValue
+ width: 222
+ placeholderText: "Amount"
+ validator: RegExpValidator { regExp: /\d*/ }
+ onTextChanged: {
+ contractFormReady()
+ }
+ }
+
+ ComboBox {
+ id: valueDenom
+ currentIndex: 6
+ model: denomModel
}
}
@@ -807,7 +829,7 @@ ApplicationWindow {
id: txGasPrice
width: 200
placeholderText: "Gas price"
- text: "1000000"
+ text: "10"
validator: RegExpValidator { regExp: /\d*/ }
/*
onTextChanged: {
@@ -815,6 +837,12 @@ ApplicationWindow {
}
*/
}
+
+ ComboBox {
+ id: gasDenom
+ currentIndex: 4
+ model: denomModel
+ }
}
Label {
@@ -848,8 +876,9 @@ ApplicationWindow {
]
text: "Send"
onClicked: {
- //this.enabled = false
- var res = eth.create(txFuelRecipient.text, txValue.text, txGas.text, txGasPrice.text, codeView.text)
+ var value = txValue.text + denomModel.get(valueDenom.currentIndex).zeros;
+ var gasPrice = txGasPrice.text + denomModel.get(gasDenom.currentIndex).zeros;
+ var res = eth.create(txFuelRecipient.text, value, txGas.text, gasPrice, codeView.text)
if(res[1]) {
txResult.text = "Your contract <b>could not</b> be send over the network:\n<b>"
txResult.text += res[1].error()
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go
index 2ba89ce22..23f53ef47 100644
--- a/ethereal/ui/gui.go
+++ b/ethereal/ui/gui.go
@@ -69,7 +69,7 @@ func (gui *Gui) Start(assetPath string) {
Init: func(p *ethpub.KeyVal, obj qml.Object) { p.Key = ""; p.Value = "" },
}})
- ethutil.Config.SetClientString(fmt.Sprintf("/Ethereal v%s", version))
+ ethutil.Config.SetClientString("Ethereal")
// Create a new QML engine
gui.engine = qml.NewEngine()