aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/assets
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-08 23:38:24 +0800
committerobscuren <geffobscura@gmail.com>2015-01-08 23:38:24 +0800
commitee84b202473a5b629a3a2b43154edb989629ddfc (patch)
tree28eeb09773f615b482554043a6bdd820b06f6fef /cmd/mist/assets
parentb25126a277da5253e4ce175dec5b68ccdf1b9b0f (diff)
downloadgo-tangerine-ee84b202473a5b629a3a2b43154edb989629ddfc.tar.gz
go-tangerine-ee84b202473a5b629a3a2b43154edb989629ddfc.tar.zst
go-tangerine-ee84b202473a5b629a3a2b43154edb989629ddfc.zip
Reworking GUI interaction. Fixed javascript inject. Closes #132
Diffstat (limited to 'cmd/mist/assets')
-rw-r--r--cmd/mist/assets/qml/browser.qml12
-rw-r--r--cmd/mist/assets/qml/main.qml4
2 files changed, 10 insertions, 6 deletions
diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml
index abaab4f15..4cf6b2470 100644
--- a/cmd/mist/assets/qml/browser.qml
+++ b/cmd/mist/assets/qml/browser.qml
@@ -59,7 +59,7 @@ Rectangle {
}
Component.onCompleted: {
- webview.url = "http://etherian.io"
+ webview.url = "/Users/jeffrey/test.html"
}
signal messages(var messages, int id);
@@ -109,7 +109,8 @@ Rectangle {
leftMargin: 5
rightMargin: 5
}
- text: "http://etherian.io"
+ //text: "http://etherian.io"
+ text: webview.url;
id: uriNav
y: parent.height / 2 - this.height / 2
@@ -151,6 +152,10 @@ Rectangle {
window.open(request.url.toString());
}
+ function injectJs(js) {
+ experimental.evaluateJavaScript(js)
+ }
+
function sendMessage(data) {
webview.experimental.postMessage(JSON.stringify(data))
}
@@ -159,8 +164,7 @@ Rectangle {
experimental.preferences.javascriptEnabled: true
experimental.preferences.navigatorQtObjectEnabled: true
experimental.preferences.developerExtrasEnabled: true
- //experimental.userScripts: ["../ext/qt_messaging_adapter.js", "../ext/q.js", "../ext/big.js", "../ext/string.js", "../ext/html_messaging.js"]
- experimental.userScripts: ["../ext/q.js", "../ext/eth.js/main.js", "../ext/eth.js/qt.js", "../ext/setup.js"]
+ //experimental.userScripts: ["../ext/q.js", "../ext/eth.js/main.js", "../ext/eth.js/qt.js", "../ext/setup.js"]
experimental.onMessageReceived: {
console.log("[onMessageReceived]: ", message.data)
// TODO move to messaging.js
diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml
index 111bef8bb..e287e384f 100644
--- a/cmd/mist/assets/qml/main.qml
+++ b/cmd/mist/assets/qml/main.qml
@@ -59,8 +59,8 @@ ApplicationWindow {
mainSplit.setView(wallet.view, wallet.menuItem);
- // Call the ready handler
- gui.done();
+ // Command setup
+ gui.sendCommand(0)
}
function addViews(view, path, options) {