diff --git a/frontend/index.html b/frontend/index.html index b43d604..1c30fb6 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -5,6 +5,17 @@ DataClaw +
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index b02d850..33a88dc 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -14,6 +14,8 @@ import { Modeling } from "./pages/Modeling"; import { Subagents } from "./pages/Subagents"; import { useAuthStore } from "./store/authStore"; +import { ThemeToggle } from "./components/ThemeToggle"; + // Protected Route Component function ProtectedRoute({ children, requireAdmin = false }: { children: React.ReactNode, requireAdmin?: boolean }) { const { isAuthenticated, user } = useAuthStore(); @@ -34,10 +36,16 @@ function MainLayout({ children }: { children: React.ReactNode }) {
-
-
+
+
+ {/* Left side empty for balance */} +
+
+
+ +
{children} @@ -57,7 +65,7 @@ function App() { -
+
diff --git a/frontend/src/components/ChatInterface.tsx b/frontend/src/components/ChatInterface.tsx index 25c73cb..f9cdf1d 100644 --- a/frontend/src/components/ChatInterface.tsx +++ b/frontend/src/components/ChatInterface.tsx @@ -545,19 +545,19 @@ export function ChatInterface() { if (!file) return null; return (
-
+
- +
-
{file.filename}
-
{t('spreadsheet')}
+
{file.filename}
+
{t('spreadsheet')}
@@ -892,15 +892,15 @@ export function ChatInterface() { }; return ( -
+
{/* Header with Model Selection */} -
+
- - + + {selectedModelId ? models.find(m => m.id === selectedModelId)?.name || 'DataClaw' : 'DataClaw'} - + @@ -918,8 +918,8 @@ export function ChatInterface() { className="flex items-center gap-2 py-2.5 cursor-pointer" >
- {model.name || model.model} - {model.provider} + {model.name || model.model} + {model.provider}
-
+
{renderFileCard()} {renderActiveSelections()}
- + - +
{/* Left Column: Data Source */} -
-
+
+
{t('dataSource')}
@@ -988,24 +988,24 @@ export function ChatInterface() { className={cn( "w-full flex items-center justify-between px-3 py-2.5 rounded-xl text-sm transition-all duration-200", selectedDataSource === ds.id - ? "bg-white text-zinc-900 shadow-sm ring-1 ring-zinc-200" - : "text-zinc-600 hover:bg-white hover:shadow-sm" + ? "bg-background text-foreground shadow-sm ring-1 ring-border" + : "text-muted-foreground hover:bg-background hover:shadow-sm" )} >
- + {ds.name}
{selectedDataSource === ds.id && } ))} {selectedDataSource && ( -
+
@@ -1015,8 +1015,8 @@ export function ChatInterface() {
{/* Right Column: Skills */} -
-
+
+
Skills
@@ -1037,8 +1037,8 @@ export function ChatInterface() { className={cn( "w-full flex items-center justify-between px-3 py-2.5 rounded-xl text-sm transition-all duration-200", isSelected - ? "bg-white text-zinc-900 shadow-sm ring-1 ring-zinc-200" - : "text-zinc-600 hover:bg-white hover:shadow-sm" + ? "bg-background text-foreground shadow-sm ring-1 ring-border" + : "text-muted-foreground hover:bg-background hover:shadow-sm" )} >
@@ -1051,15 +1051,15 @@ export function ChatInterface() { ) : (
-

{t('noAvailableSkills')}

+

{t('noAvailableSkills')}

)}
{selectedSkillIds.length > 0 && ( -
+
@@ -1077,7 +1077,7 @@ export function ChatInterface() { onChange={handleInputChange} onKeyDown={handleInputKeyDown} placeholder={t('askAnything')} - className="flex-1 bg-transparent border-none focus:ring-0 text-lg px-3 py-2 text-zinc-900 placeholder:text-zinc-300 outline-none" + className="flex-1 bg-transparent border-none focus:ring-0 text-lg px-3 py-2 text-foreground placeholder:text-muted-foreground/50 outline-none" disabled={isLoading} /> {isLoading ? ( @@ -1141,18 +1141,18 @@ export function ChatInterface() {
{msg.role === "assistant" ? ( <> {displayedThinkingContent && ( -
+
)} {msg.progressLogs && msg.progressLogs.length > 0 ? ( -
-
+
+
{isMessageGenerating ? : } {isMessageGenerating ? t('processing') : t('processCompleted')}
@@ -1215,7 +1215,7 @@ export function ChatInterface() { // 只有当是整个会话的最后一条消息,且当前日志是最后一条时,才显示 loading 动画 const isLoadingLog = isLast && isMessageGenerating; return ( -
+
{isLoadingLog ? ( ) : ( @@ -1229,26 +1229,26 @@ export function ChatInterface() {
) : null} {msg.awaitingFirstToken && !msg.content ? ( -
+
{t('modelThinking')}
) : ( <> {markdown ? ( -
+
{markdown}
) : null} {reportHtml ? ( -
+