From bbde892d5012203bb984b83fcb2fe11467841643 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 24 Apr 2014 14:43:00 +0200 Subject: Added callback mechanism and updated UI * UI Now updates when a new block has been broadcasted * Added a on, off and trigger --- ethereal/assets/qml/newTransaction/_new_contract.qml | 1 + ethereal/assets/qml/wallet.qml | 2 -- ethereal/assets/qml/webapp.qml | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'ethereal/assets/qml') diff --git a/ethereal/assets/qml/newTransaction/_new_contract.qml b/ethereal/assets/qml/newTransaction/_new_contract.qml index 29e26a562..0794d3dcd 100644 --- a/ethereal/assets/qml/newTransaction/_new_contract.qml +++ b/ethereal/assets/qml/newTransaction/_new_contract.qml @@ -117,6 +117,7 @@ Component { TextArea { id: codeView + height: 300 anchors.topMargin: 5 Layout.fillWidth: true width: parent.width /2 diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml index ed06f3518..574fbef86 100644 --- a/ethereal/assets/qml/wallet.qml +++ b/ethereal/assets/qml/wallet.qml @@ -18,13 +18,11 @@ ApplicationWindow { MenuBar { Menu { title: "File" - /* MenuItem { text: "Import App" shortcut: "Ctrl+o" onTriggered: openAppDialog.open() } - */ } Menu { diff --git a/ethereal/assets/qml/webapp.qml b/ethereal/assets/qml/webapp.qml index ee7dea0ca..9cf154e9b 100644 --- a/ethereal/assets/qml/webapp.qml +++ b/ethereal/assets/qml/webapp.qml @@ -79,6 +79,10 @@ ApplicationWindow { function postData(seed, data) { webview.experimental.postMessage(JSON.stringify({data: data, _seed: seed})) } + + function onNewBlockCb(block) { + webview.experimental.postMessage(JSON.stringify({data: block, _event: "block:new"})) + } } Rectangle { -- cgit