feat: v3 增强 - FTS5全文搜索+双向链接/知识图谱+自动保存草稿+标签管理+实时预览编辑器+PWA
- FTS5中文分词搜索(需-tags=sqlite_fts5) - [[wiki链接]]反向链接+SVG知识图谱 - 自动保存草稿(不触发版本历史) - 标签重命名/合并/删除+使用统计 - 后台编辑实时预览+格式工具栏 - PWA manifest+service worker+移动端适配 - 冒烟测试扩至66例全通过
This commit is contained in:
@@ -66,6 +66,20 @@ func Setup(r *gin.Engine, noteHandler *handler.NoteHandler, adminHandler *handle
|
||||
// 完整树 + 图片上传
|
||||
adminApi.GET("/tree", noteHandler.GetTree)
|
||||
adminApi.POST("/upload", imageHandler.Upload)
|
||||
|
||||
// 自动保存草稿
|
||||
adminApi.POST("/notes/:id/draft", noteHandler.SaveDraft)
|
||||
adminApi.DELETE("/notes/:id/draft", noteHandler.DiscardDraft)
|
||||
|
||||
// 双向链接 / 知识图谱
|
||||
adminApi.GET("/notes/:id/backlinks", noteHandler.GetBacklinks)
|
||||
adminApi.GET("/graph", noteHandler.GetKnowledgeGraph)
|
||||
|
||||
// 标签管理
|
||||
adminApi.GET("/tags/usage", noteHandler.GetTagUsage)
|
||||
adminApi.POST("/tags/rename", noteHandler.RenameTag)
|
||||
adminApi.POST("/tags/merge", noteHandler.MergeTag)
|
||||
adminApi.DELETE("/tags", noteHandler.DeleteTag)
|
||||
}
|
||||
|
||||
// ─────────── 后台管理路由 ───────────
|
||||
@@ -91,5 +105,11 @@ func Setup(r *gin.Engine, noteHandler *handler.NoteHandler, adminHandler *handle
|
||||
c.File("./web/index.html")
|
||||
})
|
||||
|
||||
// PWA 静态资源(manifest / service worker / 图标)
|
||||
r.StaticFile("/manifest.json", "./web/manifest.json")
|
||||
r.StaticFile("/sw.js", "./web/sw.js")
|
||||
r.StaticFile("/icon-192.png", "./web/icon-192.png")
|
||||
r.StaticFile("/icon-512.png", "./web/icon-512.png")
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user