aboutsummaryrefslogtreecommitdiffstats
path: root/wallet.qml
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-23 06:19:38 +0800
committerobscuren <geffobscura@gmail.com>2014-02-23 06:19:38 +0800
commitaa33a4b2fb9dc07468498decceb6fdb56d38f54d (patch)
tree995fdccb8b9c28aaf52e7f3889fc494aae19a878 /wallet.qml
parent2b967558cebcef9d3ef9719cbb28a5e596982a5d (diff)
downloadgo-tangerine-aa33a4b2fb9dc07468498decceb6fdb56d38f54d.tar
go-tangerine-aa33a4b2fb9dc07468498decceb6fdb56d38f54d.tar.gz
go-tangerine-aa33a4b2fb9dc07468498decceb6fdb56d38f54d.tar.bz2
go-tangerine-aa33a4b2fb9dc07468498decceb6fdb56d38f54d.tar.lz
go-tangerine-aa33a4b2fb9dc07468498decceb6fdb56d38f54d.tar.xz
go-tangerine-aa33a4b2fb9dc07468498decceb6fdb56d38f54d.tar.zst
go-tangerine-aa33a4b2fb9dc07468498decceb6fdb56d38f54d.zip
Added some ui elements to make it easier to connect to nodes
Diffstat (limited to 'wallet.qml')
-rw-r--r--wallet.qml70
1 files changed, 65 insertions, 5 deletions
diff --git a/wallet.qml b/wallet.qml
index e6cb32b18..b18614801 100644
--- a/wallet.qml
+++ b/wallet.qml
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.0;
import QtQuick.Layouts 1.0;
import QtQuick.Dialogs 1.0;
import QtQuick.Window 2.1;
-import GoExtensions 1.0
+import Ethereum 1.0
ApplicationWindow {
id: root
@@ -22,15 +22,19 @@ ApplicationWindow {
width: parent.width
Button {
text: "Send"
- onClicked: console.log("SEND")
+ onClicked: {
+ console.log(eth.createTx(txReceiver.text, txAmount.text))
+ }
}
TextField {
+ id: txAmount
width: 200
placeholderText: "Amount"
}
TextField {
+ id: txReceiver
width: 300
placeholderText: "Receiver Address (or empty for contract)"
Layout.fillWidth: true
@@ -47,15 +51,43 @@ ApplicationWindow {
anchors.left: parent.left
TextArea {
- id: codeView
- width: parent.width /2
+ id: codeView
+ width: parent.width /2
}
TextArea {
- readOnly: true
+ readOnly: true
}
}
+ MenuBar {
+ Menu {
+ title: "File"
+ MenuItem {
+ text: "Import App"
+ shortcut: "Ctrl+o"
+ onTriggered: openAppDialog.open()
+ }
+ }
+
+ Menu {
+ title: "Network"
+ MenuItem {
+ text: "Add Peer"
+ shortcut: "Ctrl+p"
+ onTriggered: {
+ addPeerWin.visible = true
+ }
+ }
+
+ MenuItem {
+ text: "Start"
+ onTriggered: ui.connect()
+ }
+ }
+ }
+
+
property var blockModel: ListModel {
id: blockModel
}
@@ -142,6 +174,34 @@ ApplicationWindow {
}
}
+ Window {
+ id: addPeerWin
+ visible: false
+ minimumWidth: 230
+ maximumWidth: 230
+ maximumHeight: 50
+ minimumHeight: 50
+
+ TextField {
+ id: addrField
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 10
+ placeholderText: "address:port"
+ }
+ Button {
+ anchors.left: addrField.right
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.leftMargin: 5
+ text: "Add"
+ onClicked: {
+ ui.connectToPeer(addrField.text)
+ addrPeerWin.visible = false
+ }
+ }
+ }
+
+
function addBlock(block) {
blockModel.insert(0, {number: block.number, hash: block.hash})
}