Skip to content

Commit ab3a49a

Browse files
TOR/I2P GUI functionalities implementation
1 parent 7aacdd0 commit ab3a49a

5 files changed

Lines changed: 458 additions & 11 deletions

File tree

components/NetworkStatusItem.qml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@ Rectangle {
3939
property var connected: Wallet.ConnectionStatus_Disconnected
4040

4141
function getConnectionStatusString(status) {
42+
switch(appWindow.i2pStartStopInProgress) {
43+
case 1:
44+
return qsTr("Starting I2P");
45+
case 2:
46+
return qsTr("Stopping I2P");
47+
default:
48+
break;
49+
}
50+
switch(appWindow.torStartStopInProgress) {
51+
case 1:
52+
return qsTr("Starting Tor");
53+
case 2:
54+
return qsTr("Stopping Tor");
55+
default:
56+
break;
57+
}
4258
switch (appWindow.daemonStartStopInProgress)
4359
{
4460
case 1:
@@ -188,6 +204,7 @@ Rectangle {
188204
onEntered: parent.tooltipPopup.open()
189205
onExited: parent.tooltipPopup.close()
190206
onClicked: {
207+
const i2pOnly = persistentSettings.proxyEnabled && persistentSettings.proxyType === "I2P";
191208
const callback = function(result) {
192209
refreshMouseArea.visible = true;
193210
if (result) {
@@ -198,11 +215,16 @@ Rectangle {
198215
}
199216
};
200217

201-
daemonManager.sendCommandAsync(
202-
["set_bootstrap_daemon", "auto"],
203-
appWindow.currentWallet.nettype,
204-
persistentSettings.blockchainDataDir,
205-
callback);
218+
if (i2pOnly) {
219+
appWindow.searchI2PBootstrapNode(callback);
220+
}
221+
else {
222+
daemonManager.sendCommandAsync(
223+
["set_bootstrap_daemon", "auto"],
224+
appWindow.currentWallet.nettype,
225+
persistentSettings.blockchainDataDir,
226+
callback);
227+
}
206228

207229
refreshMouseArea.visible = false;
208230
appWindow.showStatusMessage(qsTr("Switching to another public node"), 3);

0 commit comments

Comments
 (0)