From 659b9f96801dfd1e6b7fc15b8070ad638f5cad7c Mon Sep 17 00:00:00 2001 From: H3CoF6 <1707889225@qq.com> Date: Sat, 21 Mar 2026 03:05:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E9=A1=B5=E9=9D=A2way?= =?UTF-8?q?land=E8=AF=B4=E6=98=8E=E5=92=8C=E7=BC=93=E5=AD=98=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SettingsPage.tsx | 89 ++++++++++++++++++++++++++------------ 1 file changed, 62 insertions(+), 27 deletions(-) diff --git a/src/pages/SettingsPage.tsx b/src/pages/SettingsPage.tsx index b010d93..bfed9b1 100644 --- a/src/pages/SettingsPage.tsx +++ b/src/pages/SettingsPage.tsx @@ -175,6 +175,21 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { const isClearingCache = isClearingAnalyticsCache || isClearingImageCache || isClearingAllCache + const [isWayland, setIsWayland] = useState(false) + useEffect(() => { + const checkWaylandStatus = async () => { + if (window.electronAPI?.app?.checkWayland) { + try { + const wayland = await window.electronAPI.app.checkWayland() + setIsWayland(wayland) + } catch (e) { + console.error('检查 Wayland 状态失败:', e) + } + } + } + checkWaylandStatus() + }, []) + // 检查 Hello 可用性 useEffect(() => { if (window.PublicKeyCredential) { @@ -1169,6 +1184,11 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
选择通知弹窗在屏幕上的显示位置 + {isWayland && ( + + ⚠️ 注意:Wayland 环境下该配置可能无效! + + )}
( -
-

管理应用缓存数据

-
- - 留空使用默认目录 - { - const value = e.target.value - setCachePath(value) - scheduleConfigSave('cachePath', () => configService.setCachePath(value)) - }} - /> -
- - +
+

管理应用缓存数据

+
+ + 留空使用默认目录 + { + const value = e.target.value + setCachePath(value) + scheduleConfigSave('cachePath', () => configService.setCachePath(value)) + }} + /> + +
+ 当前缓存位置: + + {cachePath || (isMac ? '~/Documents/WeFlow' : isLinux ? '~/Documents/WeFlow' : '系统 文档\\WeFlow 目录')} + +
+ +
+ + +
-