feat(notebook): add /page/notebook/ai-writing route for 索财笔记 view
This commit is contained in:
1 parent
e6d3226c47
commit
e689493723
3 files changed
+61
No files matched your search
@@ -0,0 +1,49 @@
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
import AIWritingPage from '@/open-canvas/pages/AIWritingPage';
|
||||
|
||||
export default function NotebookAIWritingPage() {
|
||||
const [searchParams] = useSearchParams();
|
||||
const notebookId = searchParams.get('notebook_id');
|
||||
|
||||
return (
|
||||
<div className="h-full flex flex-col overflow-hidden">
|
||||
{/* 索财笔记 Header */}
|
||||
<div className="flex items-center gap-3 px-5 h-11 shrink-0 bg-gradient-to-r from-[#1e3a5f] to-[#1a3255] border-b border-[#2a4a70]">
|
||||
{/* 品牌 */}
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-6 h-6 rounded-md bg-blue-500 flex items-center justify-center text-white text-xs font-bold shrink-0">
|
||||
索
|
||||
</div>
|
||||
<span className="text-[#e0f0ff] text-sm font-semibold tracking-wide">索财笔记</span>
|
||||
</div>
|
||||
|
||||
{/* 分隔线 */}
|
||||
<div className="w-px h-4 bg-[#2d4f7a]" />
|
||||
|
||||
{/* 空间 ID */}
|
||||
{notebookId && (
|
||||
<div className="flex items-center gap-1.5">
|
||||
<span className="text-[#7fb3e8] text-xs">空间</span>
|
||||
<span className="text-[#b3d4f5] text-xs font-semibold bg-[#1a3a60] border border-[#2d5080] rounded px-2 py-0.5">
|
||||
{notebookId}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 弹性占位 */}
|
||||
<div className="flex-1" />
|
||||
|
||||
{/* 笔记标签 */}
|
||||
<div className="flex items-center gap-1.5 bg-[#0f2840] border border-[#2a4a70] rounded-md px-2.5 py-1">
|
||||
<span className="text-xs">📒</span>
|
||||
<span className="text-[#bfdbfe] text-xs">这是我的笔记</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 主体:AIWritingPage 完整组件,含 context providers */}
|
||||
<div className="flex-1 min-h-0 overflow-hidden">
|
||||
<AIWritingPage hideAdvancedFields />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
import NotebookAIWritingPage from './NotebookAIWritingPage';
|
||||
|
||||
export default function NotebookRoutes() {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="ai-writing" element={<NotebookAIWritingPage />} />
|
||||
</Routes>
|
||||
);
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import StrategyRoutes from "./StrategyRoutes";
|
||||
import Header from "@/strategy-components/Header";
|
||||
import OpenCanvasRoutes from "@/open-canvas/routes/OpenCanvasRoutes";
|
||||
import RoundtableRoutes from "./RoundtableRoutes";
|
||||
import NotebookRoutes from "./NotebookRoutes";
|
||||
|
||||
function PageLayout() {
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
@@ -68,6 +69,7 @@ function PageLayout() {
|
||||
<Route path="strategy/*" element={<StrategyRoutes />} />
|
||||
<Route path="canvas/*" element={<OpenCanvasRoutes />} />
|
||||
<Route path="roundtable/*" element={<RoundtableRoutes />} />
|
||||
<Route path="notebook/*" element={<NotebookRoutes />} />
|
||||
</Routes>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user