feat: run macOS app from menu bar only

This commit is contained in:
ZASENJC committed 2026-07-12 18:30:07 +08:00
1 parent c9e7ca0f9d
commit 5ee697cadc
2 files changed
+13

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSUIElement</key>
<true/>
</dict>
</plist>
+5
View File
@@ -52,6 +52,11 @@ pub fn run() {
commands::clear_chat_history
])
.setup(|app| {
// 菜单栏应用:隐藏 Dock 与应用切换器入口,只保留状态栏托盘图标。
#[cfg(target_os = "macos")]
app.handle()
.set_activation_policy(tauri::ActivationPolicy::Accessory)?;
// 应用毛玻璃磨砂底色 —— Material 3 扁平风格:保留 Popover 通透材质作为窗口底,
// 圆角与 CSS 的 --radius-window(14px) 对齐,控件一律走实色表面。
#[cfg(target_os = "macos")]