Add "Reset to defaults" in Control Center

This commit is contained in:
tiankai
2023-01-03 17:35:20 +08:00
parent b370fd187c
commit 6bd52fe961
4 changed files with 33 additions and 0 deletions

View File

@@ -38,6 +38,11 @@ pub fn get_chat_conf() -> ChatConfJson {
ChatConfJson::get_chat_conf()
}
#[command]
pub fn reset_chat_conf() -> ChatConfJson {
ChatConfJson::reset_chat_conf()
}
#[command]
pub fn form_confirm(_app: AppHandle, data: serde_json::Value) {
ChatConfJson::amend(&serde_json::json!(data), None).unwrap();