feat(db): 内容库迁入 SQLite,分类与侧栏导航改为数据库驱动

This commit is contained in:
2026-10-23 20:22:23 +08:00
parent 386c0f77c7
commit 41fed5e64d
23 changed files with 2867 additions and 319 deletions
+5 -1
View File
@@ -1,5 +1,5 @@
import type { Project } from '../../api'
import type { NavTarget } from '../../data/nav'
import type { NavModel, NavTarget } from '../../data/nav'
import { CategoryNav } from './CategoryNav'
import { ProfileCard } from './ProfileCard'
import { ServicePanel } from './ServicePanel'
@@ -10,6 +10,8 @@ import { ServicePanel } from './ServicePanel'
*/
type SidebarProps = {
projects: Project[]
/** 侧栏导航数据,来自内容库 */
nav: NavModel
live: boolean
refreshing: boolean
onRefresh: () => void
@@ -20,6 +22,7 @@ type SidebarProps = {
export function Sidebar({
projects,
nav,
live,
refreshing,
onRefresh,
@@ -39,6 +42,7 @@ export function Sidebar({
/>
<CategoryNav
nav={nav}
activeCategoryId={activeCategoryId}
activeGroupId={activeGroupId}
onNavigate={onNavigate}