This commit is contained in:
lencx
2023-01-05 17:18:47 +08:00
10 changed files with 83 additions and 70 deletions

View File

@@ -5,7 +5,7 @@ use crate::{
};
use log::info;
use std::{collections::HashMap, fs, path::PathBuf};
use tauri::{api, command, AppHandle, Manager};
use tauri::{api, command, AppHandle, Manager, Theme};
use walkdir::WalkDir;
#[command]
@@ -45,6 +45,11 @@ pub fn get_chat_conf() -> ChatConfJson {
ChatConfJson::get_chat_conf()
}
#[command]
pub fn get_theme() -> String {
ChatConfJson::theme().unwrap_or(Theme::Light).to_string()
}
#[command]
pub fn reset_chat_conf() -> ChatConfJson {
ChatConfJson::reset_chat_conf()