feat(settings): Allow settings to update UI using fetch_settings command

This commit is contained in:
quexeky
2025-01-19 19:14:52 +11:00
parent 23077040ce
commit 5bb04dafdd
4 changed files with 13 additions and 5 deletions

View File

@ -68,7 +68,10 @@ pub fn update_settings(new_settings: Value) {
db_lock.settings = new_settings;
println!("New Settings: {:?}", db_lock.settings);
}
#[tauri::command]
pub fn fetch_settings() -> Settings {
DB.borrow_data().unwrap().settings.clone()
}
#[tauri::command]
pub fn fetch_system_data() -> SystemData {
let db_handle = DB.borrow_data().unwrap();