- fix(linux): disable modal backdrop blur on Linux (WebKitGTK/Wayland) to prevent freeze when opening Add Provider panel

- refactor(ui): add runtime platform detector and conditionally apply blur only on non-Linux platforms
- chore: verify typecheck and renderer build succeed; no functional regression expected
This commit is contained in:
Jason
2025-09-19 16:17:14 +08:00
parent 21205272a5
commit b8d2daccde
6 changed files with 56 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
import React, { useState, useEffect } from "react";
import { X, Save } from "lucide-react";
import { isLinux } from "../../lib/platform";
interface CodexConfigEditorProps {
authValue: string;
@@ -166,7 +167,11 @@ const CodexConfigEditor: React.FC<CodexConfigEditorProps> = ({
}}
>
{/* Backdrop - 统一背景样式 */}
<div className="absolute inset-0 bg-black/50 dark:bg-black/70 backdrop-blur-sm" />
<div
className={`absolute inset-0 bg-black/50 dark:bg-black/70${
isLinux() ? "" : " backdrop-blur-sm"
}`}
/>
{/* Modal - 统一窗口样式 */}
<div className="relative bg-white dark:bg-gray-900 rounded-xl shadow-lg max-w-2xl w-full mx-4 max-h-[90vh] overflow-hidden flex flex-col">