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 目录')} + +
+ +
+ + +
-