fix: build error

This commit is contained in:
lencx
2022-12-12 03:00:31 +08:00
parent 35353f3564
commit 0e7fb47c4f

View File

@@ -2,7 +2,10 @@ use crate::utils::{chat_root, create_file, exists};
use anyhow::Result;
use serde_json::Value;
use std::{collections::BTreeMap, fs, path::PathBuf, sync::Mutex};
use tauri::{Theme, TitleBarStyle};
use tauri::Theme;
#[cfg(target_os = "macos")]
use tauri::TitleBarStyle;
pub const USER_AGENT: &str = "5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36";
pub const PHONE_USER_AGENT: &str = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1";
@@ -102,6 +105,7 @@ impl ChatConfJson {
}
}
#[cfg(target_os = "macos")]
pub fn titlebar() -> TitleBarStyle {
let conf = ChatConfJson::get_chat_conf();
if conf.titlebar {