Skip to content

Commit 70db149

Browse files
committed
Merge branch 'hotfix/0.6.5-2'
2 parents 353b558 + a4007f3 commit 70db149

File tree

5 files changed

+55
-43
lines changed

5 files changed

+55
-43
lines changed

mist/assets/ext/html_messaging.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335

336336
Object.defineProperty(eth, "gasPrice", {
337337
get: function() {
338-
return "1000000000000"
338+
return "10000000000000"
339339
}
340340
});
341341

mist/assets/qml/views/jeffcoin/jeffcoin.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Rectangle {
151151
Button {
152152
text: "Send"
153153
onClicked: {
154-
eth.transact({from: eth.key().privateKey, to:address, gas: "9000", gasPrice: "100000000000", data: ["0x"+txTo.text, txValue.text]})
154+
eth.transact({from: eth.key().privateKey, to:address, gas: "9000", gasPrice: "10000000000000", data: ["0x"+txTo.text, txValue.text]})
155155
}
156156
}
157157
}

mist/assets/qml/wallet.qml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ApplicationWindow {
1414

1515
property alias miningButtonText: miningButton.text
1616
property var ethx : Eth.ethx
17-
property var web
17+
property var browser
1818

1919
width: 1200
2020
height: 820
@@ -29,7 +29,7 @@ ApplicationWindow {
2929
//var messages = JSON.parse(data)
3030
// Signal handler
3131
messages(data, receiverSeed);
32-
root.web.messages(data, receiverSeed);
32+
root.browser.view.messages(data, receiverSeed);
3333
}
3434

3535
TextField {
@@ -47,7 +47,7 @@ ApplicationWindow {
4747
Component.onCompleted: {
4848
var wallet = addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true});
4949
var browser = addPlugin("./webapp.qml", {noAdd: true, close: false, section: "ethereum", active: true});
50-
root.web = browser.view;
50+
root.browser = browser;
5151

5252
addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"});
5353
addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"});
@@ -648,7 +648,12 @@ ApplicationWindow {
648648
}
649649

650650
Keys.onReturnPressed: {
651-
addPlugin(this.text, {close: true, section: "apps"})
651+
if(/^https?/.test(this.text)) {
652+
root.browser.view.open(this.text);
653+
mainSplit.setView(root.browser.view, root.browser.menuItem);
654+
} else {
655+
addPlugin(this.text, {close: true, section: "apps"})
656+
}
652657
}
653658
}
654659

mist/assets/qml/webapp.qml

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,48 @@ import "../ext/qml_messaging.js" as Messaging
1919
property alias url: webview.url
2020
property alias webView: webview
2121

22+
property var cleanPath: false
23+
property var open: function(url) {
24+
if(!window.cleanPath) {
25+
var uri = url;
26+
if(!/.*\:\/\/.*/.test(uri)) {
27+
uri = "http://" + uri;
28+
}
29+
30+
var reg = /(^https?\:\/\/(?:www\.)?)([a-zA-Z0-9_\-]*\.eth)(.*)/
31+
32+
if(reg.test(uri)) {
33+
uri.replace(reg, function(match, pre, domain, path) {
34+
uri = pre;
35+
36+
var lookup = eth.lookupDomain(domain.substring(0, domain.length - 4));
37+
var ip = [];
38+
for(var i = 0, l = lookup.length; i < l; i++) {
39+
ip.push(lookup.charCodeAt(i))
40+
}
41+
42+
if(ip.length != 0) {
43+
uri += lookup;
44+
} else {
45+
uri += domain;
46+
}
47+
48+
uri += path;
49+
});
50+
}
51+
52+
window.cleanPath = true;
53+
54+
webview.url = uri;
55+
56+
//uriNav.text = uri.text.replace(/(^https?\:\/\/(?:www\.)?)([a-zA-Z0-9_\-]*\.\w{2,3})(.*)/, "$1$2<span style='color:#CCC'>$3</span>");
57+
uriNav.text = uri;
58+
} else {
59+
// Prevent inf loop.
60+
window.cleanPath = false;
61+
}
62+
}
63+
2264
Component.onCompleted: {
2365
webview.url = "http://etherian.io"
2466
}
@@ -103,43 +145,9 @@ import "../ext/qml_messaging.js" as Messaging
103145
top: navBar.bottom
104146
}
105147

106-
property var cleanPath: false
148+
//property var cleanPath: false
107149
onNavigationRequested: {
108-
if(!this.cleanPath) {
109-
var uri = request.url.toString();
110-
if(!/.*\:\/\/.*/.test(uri)) {
111-
uri = "http://" + uri;
112-
}
113-
114-
var reg = /(^https?\:\/\/(?:www\.)?)([a-zA-Z0-9_\-]*\.eth)(.*)/
115-
116-
if(reg.test(uri)) {
117-
uri.replace(reg, function(match, pre, domain, path) {
118-
uri = pre;
119-
120-
var lookup = eth.lookupDomain(domain.substring(0, domain.length - 4));
121-
var ip = [];
122-
for(var i = 0, l = lookup.length; i < l; i++) {
123-
ip.push(lookup.charCodeAt(i))
124-
}
125-
126-
if(ip.length != 0) {
127-
uri += lookup;
128-
} else {
129-
uri += domain;
130-
}
131-
132-
uri += path;
133-
});
134-
}
135-
136-
this.cleanPath = true;
137-
138-
webview.url = uri;
139-
} else {
140-
// Prevent inf loop.
141-
this.cleanPath = false;
142-
}
150+
window.open(request.url.toString());
143151
}
144152

145153
function sendMessage(data) {

mist/ui_lib.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ func mapToTxParams(object map[string]interface{}) map[string]string {
240240
dataStr += str
241241
}
242242
object["data"] = dataStr
243-
fmt.Println(object)
244243

245244
conv := make(map[string]string)
246245
for key, value := range object {

0 commit comments

Comments
 (0)