@@ -19,7 +19,7 @@ ApplicationWindow {
19
19
height: 600
20
20
minimumHeight: 300
21
21
22
- title: " Ether Browser "
22
+ title: " Mist "
23
23
24
24
// This signal is used by the filter API. The filter API connects using this signal handler from
25
25
// the different QML files and plugins.
@@ -853,30 +853,61 @@ ApplicationWindow {
853
853
Window {
854
854
id: addPeerWin
855
855
visible: false
856
- minimumWidth: 230
857
- maximumWidth: 230
856
+ minimumWidth: 300
857
+ maximumWidth: 300
858
858
maximumHeight: 50
859
859
minimumHeight: 50
860
+ title: " Add peer"
860
861
862
+ /*
861
863
TextField {
862
864
id: addrField
863
865
anchors.verticalCenter: parent.verticalCenter
864
866
anchors.left: parent.left
867
+ anchors.right: addPeerButton.left
865
868
anchors.leftMargin: 10
869
+ anchors.rightMargin: 10
866
870
placeholderText: "address:port"
867
871
text: "54.76.56.74:30303"
868
872
onAccepted: {
869
873
eth.connectToPeer(addrField.text)
870
874
addPeerWin.visible = false
871
875
}
872
876
}
877
+ */
878
+ ComboBox {
879
+ id: addrField
880
+ anchors .verticalCenter : parent .verticalCenter
881
+ anchors .left : parent .left
882
+ anchors .right : addPeerButton .left
883
+ anchors .leftMargin : 10
884
+ anchors .rightMargin : 10
885
+ onAccepted: {
886
+ eth .connectToPeer (addrField .currentText )
887
+ addPeerWin .visible = false
888
+ }
889
+
890
+ editable: true
891
+ model: ListModel { id: pastPeers }
892
+
893
+ Component .onCompleted : {
894
+ var ips = eth .pastPeers ()
895
+ for (var i = 0 ; i < ips .length ; i++ ) {
896
+ pastPeers .append ({text: ips .get (i)})
897
+ }
898
+
899
+ pastPeers .insert (0 , {text: " 54.76.56.74:30303" })
900
+ }
901
+ }
902
+
873
903
Button {
874
- anchors .left : addrField .right
904
+ id: addPeerButton
905
+ anchors .right : parent .right
875
906
anchors .verticalCenter : parent .verticalCenter
876
- anchors .leftMargin : 5
907
+ anchors .rightMargin : 10
877
908
text: " Add"
878
909
onClicked: {
879
- eth .connectToPeer (addrField .text )
910
+ eth .connectToPeer (addrField .currentText )
880
911
addPeerWin .visible = false
881
912
}
882
913
}
0 commit comments