From 0e7fb47c4f3115eef098b34e8f1b393c36c345fd Mon Sep 17 00:00:00 2001 From: lencx Date: Mon, 12 Dec 2022 03:00:31 +0800 Subject: [PATCH] fix: build error --- src-tauri/src/conf.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/conf.rs b/src-tauri/src/conf.rs index ba4f535..12e5179 100644 --- a/src-tauri/src/conf.rs +++ b/src-tauri/src/conf.rs @@ -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 {