feat(gui): Tor toggle (#300)

* re-add tor info box, show switch for toggling tor

* add use_tor to TauriSettings, only initialize tor client when it's true

* add warning log message when not using tor client

* change the label text of the switch, fail to align switch with SettingsBox icons

* move Tor settings to SettingsBox
This commit is contained in:
Raphael 2025-04-22 16:36:09 +02:00 committed by GitHub
parent ffe103cb49
commit 3fa31ba139
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 44 additions and 77 deletions

View file

@ -18,7 +18,6 @@ use swap::cli::{
command::{Bitcoin, Monero},
};
use tauri::{async_runtime::RwLock, Manager, RunEvent};
use uuid::Uuid;
/// Trait to convert Result<T, E> to Result<T, String>
/// Tauri commands require the error type to be a string
@ -327,7 +326,7 @@ async fn initialize_context(
})
.with_json(false)
.with_debug(true)
.with_tor(true)
.with_tor(settings.use_tor)
.with_tauri(tauri_handle.clone())
.build()
.await;