|
|
@ -205,7 +205,7 @@ ApplicationWindow { |
|
|
|
Menu { |
|
|
|
Menu { |
|
|
|
title: "Network" |
|
|
|
title: "Network" |
|
|
|
MenuItem { |
|
|
|
MenuItem { |
|
|
|
text: "Add Peer" |
|
|
|
text: "Connect to Node" |
|
|
|
shortcut: "Ctrl+p" |
|
|
|
shortcut: "Ctrl+p" |
|
|
|
onTriggered: { |
|
|
|
onTriggered: { |
|
|
|
addPeerWin.visible = true |
|
|
|
addPeerWin.visible = true |
|
|
@ -838,60 +838,34 @@ ApplicationWindow { |
|
|
|
Window { |
|
|
|
Window { |
|
|
|
id: addPeerWin |
|
|
|
id: addPeerWin |
|
|
|
visible: false |
|
|
|
visible: false |
|
|
|
minimumWidth: 300 |
|
|
|
minimumWidth: 400 |
|
|
|
maximumWidth: 300 |
|
|
|
maximumWidth: 400 |
|
|
|
maximumHeight: 50 |
|
|
|
maximumHeight: 50 |
|
|
|
minimumHeight: 50 |
|
|
|
minimumHeight: 50 |
|
|
|
title: "Connect to peer" |
|
|
|
title: "Connect to Node" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TextField { |
|
|
|
ComboBox { |
|
|
|
|
|
|
|
id: addrField |
|
|
|
id: addrField |
|
|
|
|
|
|
|
placeholderText: "enode://<hex node id>:<IP address>:<port>" |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.right: addPeerButton.left |
|
|
|
anchors.right: addPeerButton.left |
|
|
|
anchors.leftMargin: 10 |
|
|
|
anchors.leftMargin: 10 |
|
|
|
anchors.rightMargin: 10 |
|
|
|
anchors.rightMargin: 10 |
|
|
|
onAccepted: { |
|
|
|
onAccepted: { |
|
|
|
eth.connectToPeer(addrField.currentText) |
|
|
|
eth.connectToPeer(addrField.text) |
|
|
|
addPeerWin.visible = false |
|
|
|
addPeerWin.visible = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
editable: true |
|
|
|
|
|
|
|
model: ListModel { id: pastPeers } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: { |
|
|
|
|
|
|
|
pastPeers.insert(0, {text: "poc-8.ethdev.com:30303"}) |
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
var ips = eth.pastPeers() |
|
|
|
|
|
|
|
for(var i = 0; i < ips.length; i++) { |
|
|
|
|
|
|
|
pastPeers.append({text: ips.get(i)}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pastPeers.insert(0, {text: "poc-7.ethdev.com:30303"}) |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ComboBox { |
|
|
|
|
|
|
|
id: nodeidField |
|
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
|
|
|
anchors.left: parent.left |
|
|
|
|
|
|
|
anchors.right: addPeerButton.left |
|
|
|
|
|
|
|
anchors.leftMargin: 10 |
|
|
|
|
|
|
|
anchors.rightMargin: 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
editable: true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Button { |
|
|
|
Button { |
|
|
|
id: addPeerButton |
|
|
|
id: addPeerButton |
|
|
|
anchors.right: parent.right |
|
|
|
anchors.right: parent.right |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.rightMargin: 10 |
|
|
|
anchors.rightMargin: 10 |
|
|
|
text: "Add" |
|
|
|
text: "Connect" |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
eth.connectToPeer(addrField.currentText, nodeidField.currentText) |
|
|
|
eth.connectToPeer(addrField.text) |
|
|
|
addPeerWin.visible = false |
|
|
|
addPeerWin.visible = false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|