diff --git a/webui/src/components/GlobalDialog.tsx b/webui/src/components/GlobalDialog.tsx index 137fd01..14aa703 100644 --- a/webui/src/components/GlobalDialog.tsx +++ b/webui/src/components/GlobalDialog.tsx @@ -34,12 +34,12 @@ export const GlobalDialog: React.FC<{ {open && ( - -
+

{options.title || (kind === 'confirm' ? t('dialogPleaseConfirm') : kind === 'prompt' ? t('dialogInputTitle') : t('dialogNotice'))}

-
+
{options.message}
{kind === 'prompt' && (
@@ -54,16 +54,16 @@ export const GlobalDialog: React.FC<{ } }} placeholder={options.inputPlaceholder || t('dialogInputPlaceholder')} - className="w-full px-3 py-2 rounded-lg bg-zinc-950 border border-zinc-800 text-sm text-zinc-100" + className="w-full px-3 py-2 rounded-xl bg-zinc-950/75 border border-zinc-800 text-sm text-zinc-100 focus:outline-none focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/20" />
)}
-
+
{(kind === 'confirm' || kind === 'prompt') && ( - + )} -
diff --git a/webui/src/components/Header.tsx b/webui/src/components/Header.tsx index 9c9fbde..3b9948e 100644 --- a/webui/src/components/Header.tsx +++ b/webui/src/components/Header.tsx @@ -1,11 +1,13 @@ import React from 'react'; -import { Terminal, Globe, Menu } from 'lucide-react'; +import { Terminal, Globe, Menu, Moon, SunMedium } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { useAppContext } from '../context/AppContext'; +import { useUI } from '../context/UIContext'; const Header: React.FC = () => { const { t, i18n } = useTranslation(); const { isGatewayOnline, setSidebarOpen, sidebarCollapsed } = useAppContext(); + const { theme, toggleTheme } = useUI(); const toggleLang = () => { const nextLang = i18n.language === 'en' ? 'zh' : 'en'; @@ -13,20 +15,20 @@ const Header: React.FC = () => { }; return ( -
+
-
+
{!sidebarCollapsed && ( {t('appName')} )}
-
+
{t('appName')} @@ -49,6 +51,15 @@ const Header: React.FC = () => {
+ + @@ -70,7 +70,7 @@ const PrimitiveArrayEditor: React.FC<{ value={draft} onChange={(e) => setDraft(e.target.value)} placeholder={t('recursiveAddValuePlaceholder')} - className="w-full bg-zinc-950 border border-zinc-800 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500" + className="w-full bg-zinc-950/70 border border-zinc-800 rounded-xl px-3 py-2 text-sm focus:outline-none focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/20" /> {suggestions.map((s) => ( @@ -83,7 +83,7 @@ const PrimitiveArrayEditor: React.FC<{ addValue(draft); setDraft(''); }} - className="px-3 py-2 text-xs rounded-lg bg-zinc-800 hover:bg-zinc-700" + className="px-3 py-2 text-xs rounded-xl bg-zinc-800 hover:bg-zinc-700" > {t('add')} @@ -95,7 +95,7 @@ const PrimitiveArrayEditor: React.FC<{ setSelected(v); if (v) addValue(v); }} - className="px-3 py-2 text-xs rounded-lg bg-zinc-950 border border-zinc-800" + className="px-3 py-2 text-xs rounded-xl bg-zinc-950/70 border border-zinc-800" > {suggestions.filter((s) => !value.includes(s)).map((s) => ( @@ -129,7 +129,7 @@ const RecursiveConfig: React.FC = ({ data, labels, path = {label} {currentPath}
-
+
{allPrimitive ? ( = ({ data, labels, path = // ignore invalid json during typing } }} - className="w-full min-h-28 bg-zinc-950 border border-zinc-800 rounded-lg px-3 py-2 text-sm font-mono focus:outline-none focus:border-indigo-500" + className="w-full min-h-28 bg-zinc-950/70 border border-zinc-800 rounded-xl px-3 py-2 text-sm font-mono focus:outline-none focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/20" /> )}
@@ -176,7 +176,7 @@ const RecursiveConfig: React.FC = ({ data, labels, path = {currentPath}
{typeof value === 'boolean' ? ( -
diff --git a/webui/src/components/Sidebar.tsx b/webui/src/components/Sidebar.tsx index ee323c1..b5aea96 100644 --- a/webui/src/components/Sidebar.tsx +++ b/webui/src/components/Sidebar.tsx @@ -44,10 +44,10 @@ const Sidebar: React.FC = () => { ]; return ( -