增加API分页和轻量级查询支持,完善备份恢复功能
主要改动: - API: 为 /api/pages 添加 lightweight 模式和分页支持 - 备份恢复: 增强 restore API 的错误处理和验证逻辑 - 工具函数: 新增 page-utils 辅助函数 - 会话管理: 优化 session 和 auth 相关逻辑 - 文档: 添加 CLAUDE.md 项目指南,包含编辑器配置注意事项 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-5
@@ -3,6 +3,7 @@ import JSZip from "jszip";
|
||||
import { saveAs } from "file-saver";
|
||||
import { Page } from "./store";
|
||||
import { useSettingsStore } from "./settings-store";
|
||||
import { sanitizeFilename } from "./page-utils";
|
||||
|
||||
import { gfm } from "turndown-plugin-gfm";
|
||||
|
||||
@@ -43,11 +44,6 @@ export function htmlToMarkdown(html: string): string {
|
||||
return turndownService.turndown(html);
|
||||
}
|
||||
|
||||
// Helper to sanitize filenames
|
||||
function sanitizeFilename(name: string): string {
|
||||
return name.replace(/[<>:"/\\|?*]/g, '_').trim();
|
||||
}
|
||||
|
||||
// Helper to escape YAML strings
|
||||
function escapeYamlString(str: string): string {
|
||||
return str.replace(/"/g, '\\"');
|
||||
|
||||
Reference in New Issue
Block a user