feat(settings): add debug page

* Create debug.rs

* Update settings.vue to add tab for debug

* Update main.scss to add light theme

* Update interface.vue to add light mode

* Create debug.vue

* Update debug.vue too add open log button

* Update lib.rs

* Update debug.rs

* Update debug.rs

* Update lib.rs

* Update lib.rs

* Update debug.rs

* Update debug.vue

* fix(debug): refactor and cleanup

* revert(theme): revert light theming

---------

Co-authored-by: DecDuck <declanahofmeyr@gmail.com>
This commit is contained in:
Aden Lindsay
2025-01-05 17:26:33 +10:30
committed by GitHub
parent 2bd13eea58
commit 2d5d0d5ab3
5 changed files with 206 additions and 5 deletions
+23
View File
@@ -0,0 +1,23 @@
use crate::{DATA_ROOT_DIR, DB};
use serde::Serialize;
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SystemData {
client_id: String,
base_url: String,
data_dir: String,
}
#[tauri::command]
pub fn fetch_system_data() -> Result<SystemData, String> {
let db_handle = DB.borrow_data().map_err(|e| e.to_string())?;
let system_data = SystemData {
client_id: db_handle.auth.as_ref().unwrap().client_id.clone(),
base_url: db_handle.base_url.clone(),
data_dir: DATA_ROOT_DIR.lock().unwrap().to_string_lossy().to_string(),
};
drop(db_handle);
Ok(system_data)
}