feat: rudimentary config

This commit is contained in:
2025-02-24 00:01:25 +00:00
parent 70b8b3ae55
commit b7fe76b6ff
11 changed files with 64 additions and 20 deletions

View File

@ -134,3 +134,19 @@ pub async fn init_profile(
Ok(new_profile)
}
#[tauri::command]
pub async fn set_cfg(
state: State<'_, Mutex<AppData>>,
key: String,
value: String
) -> Result<(), ()> {
log::debug!("invoke: sync_cfg({}, {})", key, value);
let mut appd = state.lock().await;
if let Some(p) = &mut appd.profile {
p.cfg.insert(key, value);
}
Ok(())
}