style(frontend):优化前端效果

1.对于UI的配色和布局进行了优化
This commit is contained in:
2026-06-01 03:30:30 +00:00
parent 99520c69d7
commit f04fef916f
11 changed files with 452 additions and 416 deletions
+7 -12
View File
@@ -28,7 +28,6 @@ function App() {
const { loadSessions } = useChatStore();
// Initialize theme on mount
useEffect(() => {
applyTheme();
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
@@ -37,14 +36,12 @@ function App() {
return () => mediaQuery.removeEventListener('change', handler);
}, [applyTheme]);
// Sync persisted locale to i18next on mount
useEffect(() => {
if (locale && i18n.language !== locale) {
i18n.changeLanguage(locale);
}
}, [locale]);
// Check auth and load sessions
useEffect(() => {
const token = localStorage.getItem('token');
if (token) {
@@ -75,11 +72,9 @@ function App() {
<div className="flex-1 flex overflow-hidden">
{mode === 'work' && workTab === 'chat' && (
<div className="flex-1 p-4 flex overflow-hidden gap-4">
<div className="flex-1 flex bg-bg-card rounded-2xl shadow-sm border border-border-primary overflow-hidden relative">
<LeftPanel activeTab="chats" />
<ChatPanel />
</div>
<div className="flex-1 flex overflow-hidden">
<LeftPanel activeTab="chats" />
<ChatPanel />
</div>
)}
@@ -101,22 +96,22 @@ function WorkflowShell() {
if (selectedWorkflow === 'new') {
return (
<>
<div className="flex-1 flex overflow-hidden">
<LeftPanel activeTab="workflows" />
<NewWorkflowDialog
onClose={() => setSelectedWorkflow(null)}
onSuccess={(traceId: string) => setSelectedWorkflow(traceId)}
/>
</>
</div>
);
}
if (selectedWorkflow) {
return (
<>
<div className="flex-1 flex overflow-hidden">
<LeftPanel activeTab="workflows" />
<RightPanel selectedWorkflow={selectedWorkflow} />
</>
</div>
);
}