样式修改
This commit is contained in:
1 parent
ab6b6876aa
commit
7f1f34e34f
15 files changed
+536
-100
No files matched your search
@@ -0,0 +1,126 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { BookOpen, Plus, Send } from "lucide-react";
|
||||
|
||||
import { useTheme } from "@/contexts/ThemeContext";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export default function LightAppNoteQAPage() {
|
||||
const { theme } = useTheme();
|
||||
const isDark = theme === "dark";
|
||||
const [question, setQuestion] = useState("");
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (!question.trim()) return;
|
||||
setQuestion("");
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"relative h-full w-full overflow-hidden",
|
||||
isDark ? "bg-slate-950" : "bg-white",
|
||||
)}
|
||||
>
|
||||
{/* 背景光晕 */}
|
||||
<div
|
||||
className="pointer-events-none absolute inset-0"
|
||||
style={{
|
||||
background: isDark
|
||||
? "radial-gradient(ellipse 60% 50% at 50% 46%, rgba(59,130,246,0.10) 0%, rgba(139,92,246,0.06) 50%, transparent 70%)"
|
||||
: "radial-gradient(ellipse 60% 50% at 50% 46%, rgba(147,197,253,0.38) 0%, rgba(165,180,252,0.18) 50%, transparent 70%)",
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* 主内容 */}
|
||||
<div className="relative flex h-full flex-col items-center justify-center -translate-y-10">
|
||||
<div className="flex w-full max-w-[520px] flex-col items-center gap-4 px-6">
|
||||
|
||||
{/* 笔记图标 */}
|
||||
<div
|
||||
className={cn(
|
||||
"flex h-12 w-10 shrink-0 items-center justify-center rounded shadow-sm",
|
||||
isDark ? "bg-violet-400 text-slate-950" : "bg-[#4d3f74] text-white",
|
||||
)}
|
||||
>
|
||||
<BookOpen className="h-6 w-6" />
|
||||
</div>
|
||||
|
||||
{/* 笔记标题 */}
|
||||
<h1
|
||||
className={cn(
|
||||
"text-xl font-semibold tracking-tight",
|
||||
isDark ? "text-slate-100" : "text-slate-900",
|
||||
)}
|
||||
>
|
||||
笔记01
|
||||
</h1>
|
||||
|
||||
{/* 新增来源按钮 */}
|
||||
<button
|
||||
type="button"
|
||||
className={cn(
|
||||
"flex items-center gap-1.5 rounded-full px-4 py-1 text-sm font-medium transition-colors",
|
||||
isDark
|
||||
? "bg-sky-500/20 text-sky-300 hover:bg-sky-500/30"
|
||||
: "bg-sky-100 text-sky-600 hover:bg-sky-200",
|
||||
)}
|
||||
>
|
||||
<Plus className="h-3.5 w-3.5" />
|
||||
新增来源
|
||||
</button>
|
||||
|
||||
{/* 问答输入框 */}
|
||||
<div
|
||||
className={cn(
|
||||
"mt-3 flex w-full items-center gap-3 rounded-full px-5 py-3.5",
|
||||
isDark
|
||||
? "bg-slate-800 ring-1 ring-white/10"
|
||||
: "bg-white shadow-sm ring-1 ring-black/5",
|
||||
)}
|
||||
>
|
||||
<Plus
|
||||
className={cn(
|
||||
"h-4 w-4 shrink-0",
|
||||
isDark ? "text-slate-500" : "text-slate-400",
|
||||
)}
|
||||
/>
|
||||
<input
|
||||
value={question}
|
||||
onChange={(e) => setQuestion(e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
handleSubmit();
|
||||
}
|
||||
}}
|
||||
placeholder="开始问答"
|
||||
className={cn(
|
||||
"min-w-0 flex-1 bg-transparent text-sm outline-none",
|
||||
isDark
|
||||
? "text-slate-200 placeholder:text-slate-500"
|
||||
: "text-slate-700 placeholder:text-slate-400",
|
||||
)}
|
||||
/>
|
||||
{question.trim() && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleSubmit}
|
||||
className={cn(
|
||||
"flex h-7 w-7 shrink-0 items-center justify-center rounded-full transition-colors",
|
||||
isDark
|
||||
? "bg-sky-500 text-white hover:bg-sky-400"
|
||||
: "bg-[#F5222D] text-white hover:bg-[#CF1322]",
|
||||
)}
|
||||
aria-label="发送"
|
||||
>
|
||||
<Send className="h-3.5 w-3.5" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -26,6 +26,7 @@ import AdminUserActivityPage from "./AdminUserActivityPage";
|
||||
import TagsPage from "./TagsPage";
|
||||
import LightAppNewNotePage from "./LightAppNewNotePage";
|
||||
import LightAppNoteListPage from "./LightAppNoteListPage";
|
||||
import LightAppNoteQAPage from "./LightAppNoteQAPage";
|
||||
|
||||
export default function StrategyRoutes() {
|
||||
return (
|
||||
@@ -41,6 +42,7 @@ export default function StrategyRoutes() {
|
||||
{/* 轻应用 */}
|
||||
<Route path="light-app/new-note" element={<LightAppNewNotePage />} />
|
||||
<Route path="light-app/notes" element={<LightAppNoteListPage />} />
|
||||
<Route path="light-app/note-qa" element={<LightAppNoteQAPage />} />
|
||||
|
||||
{/* 对话 */}
|
||||
<Route path="chats" element={<ChatsPage />} />
|
||||
|
||||
@@ -182,7 +182,7 @@ export default function WorkspaceRoutes({
|
||||
path="ai-writing"
|
||||
element={
|
||||
<WorkspaceLayout {...layoutProps}>
|
||||
<AIWritingPage />
|
||||
<AIWritingPage hideAdvancedFields />
|
||||
</WorkspaceLayout>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user