重构大量文件

This commit is contained in:
2026-02-24 10:50:11 +08:00
parent dd97cf6a2c
commit 9efdf060f5
29 changed files with 264 additions and 133 deletions
+1 -9
View File
@@ -3,7 +3,7 @@
import { SidebarContent, ResizableSidebar } from "@/components/sidebar";
import { Editor } from "@/components/editor";
import { useEditorStore } from "@/lib/store";
import { FileDown, Hash, X, Plus, ChevronLeft, ChevronRight, Sparkles, Lock, Unlock } from "lucide-react";
import { Hash, X, Plus, ChevronLeft, ChevronRight, Sparkles, Lock, Unlock } from "lucide-react";
import { useSettingsStore } from "@/lib/settings-store";
import { exportPageAsMarkdown } from "@/lib/export";
import { useState } from "react";
@@ -46,14 +46,6 @@ export default function Home() {
<div className="flex-1 overflow-y-auto scroll-smooth">
<div className="max-w-7xl mx-auto px-4 md:px-16 py-6 min-h-screen content-start">
{/* Mobile Back Button */}
<div className="md:hidden mb-4 flex items-center text-muted-foreground" onClick={() => updatePage(null as any, {} as any)}>
{/* Note: updatePage isn't the right way to clear selection. We need setPageId(null).
But store only exposes updatePage. Let's fix store usage or use a store action if available.
Actually, looking at store.ts, we need `setActivePageId`.
*/}
</div>
<div className="group mb-8 relative">
{/* Mobile Back Button Integration in Header */}
<div className="md:hidden absolute -top-12 left-0 flex items-center gap-1 py-2 text-muted-foreground hover:text-foreground cursor-pointer"