From e89047dc6a8f17bc2e774267a6a3242751d9a35c Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 14 Sep 2024 14:36:07 +0800 Subject: [PATCH] :bug: System code compatibility --- package.json | 2 +- src-tauri/src/app/window.rs | 4 ++-- src-tauri/src/main.rs | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 670fea455..b982dc93d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pake-cli", - "version": "2.6.0", + "version": "2.6.1", "description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。", "engines": { "node": ">=16.0.0" diff --git a/src-tauri/src/app/window.rs b/src-tauri/src/app/window.rs index bd32cec0e..36a993c2a 100644 --- a/src-tauri/src/app/window.rs +++ b/src-tauri/src/app/window.rs @@ -1,9 +1,9 @@ use crate::app::config::PakeConfig; use std::path::PathBuf; -use tauri::{App, Theme, Window, WindowBuilder, WindowUrl}; +use tauri::{App, Window, WindowBuilder, WindowUrl}; #[cfg(target_os = "macos")] -use tauri::TitleBarStyle; +use tauri::{Theme, TitleBarStyle}; pub fn build_window(app: &mut App, config: PakeConfig, _data_dir: PathBuf) -> Window { let window_config = config diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 85826a0cb..487a33b35 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -9,11 +9,13 @@ mod util; use app::{invoke, menu, window}; use invoke::{download_file, download_file_by_binary}; use menu::{get_system_tray, system_tray_handle}; -use std::time::Duration; use tauri::{GlobalShortcutManager, Manager}; use util::{get_data_dir, get_pake_config}; use window::build_window; +#[cfg(target_os = "macos")] +use std::time::Duration; + pub fn run_app() { let (pake_config, tauri_config) = get_pake_config(); let data_dir = get_data_dir(tauri_config);