mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-18 15:51:34 +02:00
wowlet: local/remote node toggle in Settings -> Network. Checkbox 'Run your own Wownero node (much recommended)' + doge-y copy on privacy/network-health; toggling live-starts/stops the embedded wownerod and reconnects (autoConnect honours runLocalNode: local when on, chosen remote when off); remote list greys out while the built-in node is active
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "utils/WebsocketNotifier.h"
|
||||
#include "widgets/NetworkProxyWidget.h"
|
||||
#include "utils/ColorScheme.h"
|
||||
#include "utils/DaemonManager.h"
|
||||
|
||||
Settings::Settings(Nodes *nodes, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
@@ -169,6 +170,15 @@ void Settings::setupNetworkTab() {
|
||||
ui->nodeWidget->setupUI(m_nodes);
|
||||
connect(ui->nodeWidget, &NodeWidget::nodeSourceChanged, m_nodes, &Nodes::onNodeSourceChanged);
|
||||
connect(ui->nodeWidget, &NodeWidget::connectToNode, m_nodes, QOverload<const FeatherNode&>::of(&Nodes::connectToNode));
|
||||
// wowlet: built-in node on/off — start/stop the embedded wownerod, then reconnect (autoConnect
|
||||
// honours Config::runLocalNode: local 127.0.0.1 when on, the selected remote when off).
|
||||
connect(ui->nodeWidget, &NodeWidget::localNodeToggled, this, [this](bool enabled){
|
||||
if (enabled)
|
||||
daemonManager()->start();
|
||||
else
|
||||
daemonManager()->stop();
|
||||
m_nodes->autoConnect(true);
|
||||
});
|
||||
} else {
|
||||
m_nodes = new Nodes(this, nullptr);
|
||||
ui->nodeWidget->setupUI(m_nodes);
|
||||
|
||||
Reference in New Issue
Block a user