aboutsummaryrefslogtreecommitdiffstats
path: root/mist/assets
diff options
context:
space:
mode:
Diffstat (limited to 'mist/assets')
-rw-r--r--mist/assets/debugger/debugger.qml2
-rw-r--r--mist/assets/ext/html_messaging.js27
-rw-r--r--mist/assets/qml/main.qml (renamed from mist/assets/qml/wallet.qml)5
-rw-r--r--mist/assets/qml/views/info.qml41
-rw-r--r--mist/assets/qml/views/jeffcoin/jeffcoin.qml8
-rw-r--r--mist/assets/qml/views/wallet.qml4
6 files changed, 34 insertions, 53 deletions
diff --git a/mist/assets/debugger/debugger.qml b/mist/assets/debugger/debugger.qml
index 8d54b5b5d..b30d20e6b 100644
--- a/mist/assets/debugger/debugger.qml
+++ b/mist/assets/debugger/debugger.qml
@@ -357,7 +357,7 @@ ApplicationWindow {
anchors.right: parent.right
model: ListModel {
ListElement { text: "Snippets" ; value: "" }
- ListElement { text: "Call Contract" ; value: "var[2] in;\nvar ret;\n\nin[0] = \"arg1\"\nin[1] = 0xdeadbeef\n\nvar success = call(0x0c542ddea93dae0c2fcb2cf175f03ad80d6be9a0, 0, 7000, in, ret)\n\nreturn ret" }
+ ListElement { text: "Call Contract" ; value: "var[2] in = { \"arg1\", 0xdeadbeef };\nvar ret;\n\nvar success = call(0x0c542ddea93dae0c2fcb2cf175f03ad80d6be9a0, 0, 7000, in, ret)\n\nreturn ret" }
}
onCurrentIndexChanged: {
if(currentIndex != 0) {
diff --git a/mist/assets/ext/html_messaging.js b/mist/assets/ext/html_messaging.js
index efb950b4b..1f9418148 100644
--- a/mist/assets/ext/html_messaging.js
+++ b/mist/assets/ext/html_messaging.js
@@ -92,19 +92,19 @@
promises.push(params.from.then(function(_from) { params.from = _from; }));
}
- if(isPromise(params.data)) {
- promises.push(params.data.then(function(_code) { params.data = _code; }));
- } else {
- if(typeof params.data === "object") {
- data = "";
- for(var i = 0; i < params.data.length; i++) {
- data += params.data[i]
- }
- } else {
- data = params.data;
- }
- }
-
+ if(typeof params.data !== "object" || isPromise(params.data)) {
+ params.data = [params.data]
+ }
+
+ var data = params.data;
+ for(var i = 0; i < params.data.length; i++) {
+ if(isPromise(params.data[i])) {
+ var promise = params.data[i];
+ var _i = i;
+ promises.push(promise.then(function(_arg) { params.data[_i] = _arg; }));
+ }
+ }
+
// Make sure everything is string
var fields = ["value", "gas", "gasPrice"];
for(var i = 0; i < fields.length; i++) {
@@ -117,6 +117,7 @@
// Load promises then call the last "transact".
return Q.all(promises).then(function() {
return new Promise(function(resolve, reject) {
+ params.data = params.data.join("");
postData({call: "transact", args: params}, function(data) {
if(data[1])
reject(data[0]);
diff --git a/mist/assets/qml/wallet.qml b/mist/assets/qml/main.qml
index 885d09116..0ee063f17 100644
--- a/mist/assets/qml/wallet.qml
+++ b/mist/assets/qml/main.qml
@@ -739,7 +739,7 @@ ApplicationWindow {
function addPeer(peer) {
// We could just append the whole peer object but it cries if you try to alter them
- peerModel.append({ip: peer.ip, port: peer.port, lastResponse:timeAgo(peer.lastSend), latency: peer.latency, version: peer.version})
+ peerModel.append({ip: peer.ip, port: peer.port, lastResponse:timeAgo(peer.lastSend), latency: peer.latency, version: peer.version, caps: peer.caps})
}
function resetPeers(){
@@ -782,10 +782,11 @@ ApplicationWindow {
id: peerTable
model: peerModel
TableViewColumn{width: 100; role: "ip" ; title: "IP" }
- TableViewColumn{width: 60; role: "port" ; title: "Port" }
+ TableViewColumn{width: 60; role: "port" ; title: "Port" }
TableViewColumn{width: 140; role: "lastResponse"; title: "Last event" }
TableViewColumn{width: 100; role: "latency"; title: "Latency" }
TableViewColumn{width: 260; role: "version" ; title: "Version" }
+ TableViewColumn{width: 80; role: "caps" ; title: "Capabilities" }
}
}
}
diff --git a/mist/assets/qml/views/info.qml b/mist/assets/qml/views/info.qml
index 8a1d4d84a..158e2c960 100644
--- a/mist/assets/qml/views/info.qml
+++ b/mist/assets/qml/views/info.qml
@@ -121,40 +121,7 @@ Rectangle {
}
}
- Slider {
- id: logLevelSlider
- value: gui.getLogLevelInt()
- anchors {
- right: parent.right
- top: parent.top
- bottom: parent.bottom
-
- rightMargin: 5
- leftMargin: 5
- topMargin: 5
- bottomMargin: 5
- }
-
- orientation: Qt.Vertical
- maximumValue: 5
- stepSize: 1
-
- onValueChanged: {
- gui.setLogLevel(value)
- }
- }
- }
-
- property var logModel: ListModel {
- id: logModel
- }
-
- /*
- RowLayout {
- id: logLayout
- width: parent.width
- height: 200
- anchors.bottom: parent.bottom
+ /*
TableView {
id: logView
headerVisible: false
@@ -169,6 +136,7 @@ Rectangle {
model: logModel
}
+ */
Slider {
id: logLevelSlider
@@ -193,7 +161,10 @@ Rectangle {
}
}
}
- */
+
+ property var logModel: ListModel {
+ id: logModel
+ }
function addDebugMessage(message){
debuggerLog.append({value: message})
diff --git a/mist/assets/qml/views/jeffcoin/jeffcoin.qml b/mist/assets/qml/views/jeffcoin/jeffcoin.qml
index 6506b53b8..23502d334 100644
--- a/mist/assets/qml/views/jeffcoin/jeffcoin.qml
+++ b/mist/assets/qml/views/jeffcoin/jeffcoin.qml
@@ -22,6 +22,8 @@ Rectangle {
var me = eth.key().address;
if((to == me|| from == me) && message.input.length == 128) {
+ var to = eth.lookupName(to)
+ var from = eth.lookupName(from)
txModel.insert(0, {confirmations: blockNumber - message.number, from: from, to: to, value: value})
}
}
@@ -151,7 +153,11 @@ Rectangle {
Button {
text: "Send"
onClicked: {
- eth.transact({from: eth.key().privateKey, to:address, gas: "9000", gasPrice: "10000000000000", data: ["0x"+txTo.text, txValue.text]})
+ var lookup = eth.lookupAddress(address)
+ if(lookup.length == 0)
+ lookup = address
+
+ eth.transact({from: eth.key().privateKey, to:lookup, gas: "9000", gasPrice: "10000000000000", data: ["0x"+txTo.text, txValue.text]})
}
}
}
diff --git a/mist/assets/qml/views/wallet.qml b/mist/assets/qml/views/wallet.qml
index a3a4a6e7c..a57e7869a 100644
--- a/mist/assets/qml/views/wallet.qml
+++ b/mist/assets/qml/views/wallet.qml
@@ -160,7 +160,9 @@ Rectangle {
function addTxs(messages) {
for(var i = 0; i < messages.length; i++) {
var message = messages.get(i);
- txModel.insert(0, {num: txModel.count, from: message.from, to: message.to, value: eth.numberToHuman(message.value)})
+ var to = eth.lookupName(message.to);
+ var from = eth.lookupName(message.from);
+ txModel.insert(0, {num: txModel.count, from: from, to: to, value: eth.numberToHuman(message.value)})
}
}
}