diff --git a/frontend/src/App.css b/frontend/src/App.css index 24b8e5b..cadcc28 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -7,7 +7,7 @@ html, body, #root { } body, #root { - border-radius: 14px; /* Slightly rounded app window corners */ + border-radius: var(--gonavi-border-radius); /* Slightly rounded app window corners */ } /* 侧边栏 Tree 样式优化 */ diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 3c6825d..bf8b0de 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -85,6 +85,7 @@ function App() { const [isSyncModalOpen, setIsSyncModalOpen] = useState(false); const [isDriverModalOpen, setIsDriverModalOpen] = useState(false); const [editingConnection, setEditingConnection] = useState(null); + const windowState = useStore(state => state.windowState); const themeMode = useStore(state => state.theme); const setTheme = useStore(state => state.setTheme); const appearance = useStore(state => state.appearance); @@ -119,7 +120,6 @@ function App() { const effectiveOpacity = normalizeOpacityForPlatform(resolvedAppearance.opacity); const effectiveBlur = normalizeBlurForPlatform(resolvedAppearance.blur); const blurFilter = blurToFilter(effectiveBlur); - const windowCornerRadius = 14; const [runtimePlatform, setRuntimePlatform] = useState(''); const [isLinuxRuntime, setIsLinuxRuntime] = useState(false); const [isStoreHydrated, setIsStoreHydrated] = useState(() => useStore.persist.hasHydrated()); @@ -132,6 +132,19 @@ function App() { const globalProxyInvalidHintShownRef = React.useRef(false); const connectionWorkbenchState = getConnectionWorkbenchState(isStoreHydrated, hasLoadedSecureConfig); + const windowCornerRadius = 14; + useEffect(()=>{ + switch(windowState){ + case 'fullscreen': + case 'maximized': + document.body.setAttribute('--gonavi-border-radius', '0px'); + break; + default: + document.body.setAttribute('--gonavi-border-radius', `${windowCornerRadius}px`); + break; + } + }, [windowState]); + // 同步 macOS 窗口透明度:opacity=1.0 且 blur=0 时关闭 NSVisualEffectView, // 避免 GPU 持续计算窗口背后的模糊合成 useEffect(() => { @@ -1727,8 +1740,8 @@ function App() { display: 'flex', flexDirection: 'column', background: 'transparent', - borderRadius: showLinuxResizeHandles ? 0 : windowCornerRadius, - clipPath: showLinuxResizeHandles ? 'none' : `inset(0 round ${windowCornerRadius}px)`, + borderRadius: showLinuxResizeHandles ? 0 : 'var(--gonavi-border-radius)', + clipPath: showLinuxResizeHandles ? 'none' : 'inset(0 round var(--gonavi-border-radius))', backdropFilter: blurFilter, WebkitBackdropFilter: blurFilter, }}> @@ -1913,7 +1926,7 @@ function App() {
-
+
{aiEntryPlacement === 'content-edge' && aiEdgeHandleAttachment === 'content-shell' && (