diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-26 07:47:04 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-26 07:47:04 +0800 |
commit | e16fd323e800297602a60b7a0e7b7897a55d2fa0 (patch) | |
tree | 1c27a3bc225af36d6b0b2117ba6b649cc3983110 /ethereal/assets/qml | |
parent | d0438ac10ab55cd12c1ab5ec3aaf0030185bf131 (diff) | |
download | go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.gz go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.bz2 go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.lz go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.xz go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.tar.zst go-tangerine-e16fd323e800297602a60b7a0e7b7897a55d2fa0.zip |
Leverage the new watch & address:changed functionality
Diffstat (limited to 'ethereal/assets/qml')
-rw-r--r-- | ethereal/assets/qml/webapp.qml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ethereal/assets/qml/webapp.qml b/ethereal/assets/qml/webapp.qml index 9cf154e9b..c34e0dc55 100644 --- a/ethereal/assets/qml/webapp.qml +++ b/ethereal/assets/qml/webapp.qml @@ -74,14 +74,24 @@ ApplicationWindow { var keys = eth.getKey() postData(data._seed, keys) break + case "watch": + if(data.args.length > 0) { + eth.watch(data.args[0]); + } } } function postData(seed, data) { webview.experimental.postMessage(JSON.stringify({data: data, _seed: seed})) } + function postEvent(event, data) { + webview.experimental.postMessage(JSON.stringify({data: data, _event: event})) + } function onNewBlockCb(block) { - webview.experimental.postMessage(JSON.stringify({data: block, _event: "block:new"})) + postEvent("block:new", block) + } + function onObjectChangeCb(stateObject) { + postEvent("object:change", stateObject) } } |