mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
feat: add menu item
This commit is contained in:
@@ -4,18 +4,18 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
process::Command,
|
||||
};
|
||||
use tauri::utils::config::Config;
|
||||
// use tauri::utils::config::Config;
|
||||
|
||||
pub fn chat_root() -> PathBuf {
|
||||
tauri::api::path::home_dir().unwrap().join(".chatgpt")
|
||||
}
|
||||
|
||||
pub fn get_tauri_conf() -> Option<Config> {
|
||||
let config_file = include_str!("../tauri.conf.json");
|
||||
let config: Config =
|
||||
serde_json::from_str(config_file).expect("failed to parse tauri.conf.json");
|
||||
Some(config)
|
||||
}
|
||||
// pub fn get_tauri_conf() -> Option<Config> {
|
||||
// let config_file = include_str!("../tauri.conf.json");
|
||||
// let config: Config =
|
||||
// serde_json::from_str(config_file).expect("failed to parse tauri.conf.json");
|
||||
// Some(config)
|
||||
// }
|
||||
|
||||
pub fn exists(path: &Path) -> bool {
|
||||
Path::new(path).exists()
|
||||
|
||||
Reference in New Issue
Block a user