siyuan/kernel/api
Achuan-2 7545c2517f
Improve the outline panel (#15814)
*  实现大纲持久化
- 添加折叠状态变化的实时保存功能
- 在文档更新时恢复折叠状态
- 保存拖拽前的折叠状态并在拖拽后恢复
- 更新本地存储结构以支持折叠状态

* 🎨 clean code

*  在`data/storage`文件夹下创建`outline/${docID}.json`文件,存储标题outline展开信息

*  alt click折叠/展开统计标题

* 添加层级控制功能
- 新增层级控制滑条,允许用户展开指定层级

* 🌐 添加多语言支持的展开层级功能

*  f添加层级重置显示功能
- 新增 resetLevelDisplay 方法以重置层级显示状态
- 更新层级控制的初始化逻辑,默认不显示层级
- 在文档切换时重置层级显示状态

* 优化层级控制功能
- 添加用户主动层级控制标记
- 修改层级显示重置逻辑,仅在非用户操作时重置
- 更新层级控制滑条的点击事件处理

* ♻️ 重构大纲存储逻辑
- 合并大纲存储为单一文件 outline.json

* ♻️ outline.json 单行存储

* ♻️ outline.json参考recent-doc.json,只存储前1000个文档信息,每次新增信息会把数据放在最前面

* ♻️单行存储json

* ♻️ 增加outline.json存储限制至2000个

*  新增`保持当前标题展开`按钮,`保持全部展开`改为`全部展开`按钮

*  保持当前标题展开优化
- 超过两级折叠,也能都展开
- 如果父节点折叠,展开时自动折叠兄弟节点,只展开当前节点路径,如果父节点是展开状态,则不影响兄弟节点折叠状态

* 🔥 移除层级文本

*  右键点击toggle时展开所有子标题

*  右键click点击折叠图标,会折叠/展开所有子标题

*  大纲支持筛选功能

*  feat(大纲): 优化筛选功能以显示所有子标题
- 添加 showAllDescendants 函数以显示所有子标题
- 修改 processUL 函数以在父标题命中时显示所有子标题
- 确保未命中的子标题隐藏

*  优化大纲筛选

- 如果标题命中筛选,这个标题的所有父标题展开,以显示出这个标题位置
- 如果父标题命中筛选,子项都没有命中筛选,则折叠全部子项(依然可以展开显示)
- 如果父标题命中筛选,子项也有命中筛选,则展开命中的子项,其他无关子项隐藏

* 💄 展开层级改为按钮,原先的圆点样式碍眼

* 💄 展开层级改为按钮,原先的圆点样式碍眼

* 💄 style(菜单): 优化展开层级菜单的样式和位置
- 添加图标以增强可视化
- 调整菜单弹出位置以改善用户体验

* ♻️ refactor(大纲): 优化标题级别获取逻辑
- 调整展开到指定层级的逻辑,使用标题级别进行判断

* 🎨

*  feat(大纲): 添加右键菜单功能
- 实现右键点击标题时显示上下文菜单
- 增加标题升级、降级、插入、删除等操作
- 基于标题级别展开/折叠同级标题

*  feat(大纲): 添加子标题功能
- 在右键菜单中添加“添加子标题”选项
- 实现子标题的添加逻辑,支持最大级别为H6
- 使用当前标题作为父标题,插入新子标题

*  feat(大纲): "添加子标题"确保父标题展开状态

*  feat(大纲): 使用expandIds方式保存父标题展开状态
- 确保父标题保持展开状态
- 保存展开状态到持久化存储
- 移除冗余的状态保存逻辑

*  feat(大纲): 调整右键菜单顺序,将“全部折叠”功能移至“全部展开”之后

* 🌐 i18n optimization
2025-10-15 10:01:47 +08:00
..
account.go ♻️ Refactor Go to err != nil, err == nil (#12385) 2024-09-04 09:40:50 +08:00
ai.go 🎨 Update slogan Refactor your thinking https://github.com/siyuan-note/siyuan/issues/8608 2023-06-24 20:39:55 +08:00
archive.go ♻️ Refactor Go to err != nil, err == nil (#12385) 2024-09-04 09:40:50 +08:00
asset.go 🎨 Upload asset files to cloud supports focus use https://github.com/siyuan-note/siyuan/issues/15462 2025-08-07 11:09:07 +08:00
attr.go ♻️ Improve database loading performance https://github.com/siyuan-note/siyuan/issues/12818 2024-10-17 23:45:28 +08:00
av.go 🐛 Database is constantly loading https://github.com/siyuan-note/siyuan/issues/16023 2025-10-08 15:48:46 +08:00
bazaar.go 🎨 Search results should remain unchanged after downloading or deleting the marketplace package https://github.com/siyuan-note/siyuan/issues/12252 2024-09-05 23:02:35 +08:00
block.go 🎨 Add scenes for expanding and collapsing headings https://github.com/siyuan-note/siyuan/issues/15726 2025-09-15 22:07:53 +08:00
block_op.go 🧑‍💻 Add some kernel batch insert blocks APIs https://github.com/siyuan-note/siyuan/issues/15321 2025-07-18 10:41:48 +08:00
bookmark.go ♻️ Refactor Go to err != nil, err == nil (#12385) 2024-09-04 09:40:50 +08:00
broadcast.go ♻️ Refactor EventSource broadcast subscribe (#13708) 2025-01-03 09:28:16 +08:00
clipboard.go 🎨 Update slogan Refactor your thinking https://github.com/siyuan-note/siyuan/issues/8608 2023-06-24 20:39:55 +08:00
export.go 🧑‍💻 Add parameter imgTag for kernel API exportMdContent and copyStdMarkdown https://github.com/siyuan-note/siyuan/issues/15454 2025-08-07 21:29:14 +08:00
extension.go 🐛 PDF files with too long file names cannot generate annotated images https://github.com/siyuan-note/siyuan/issues/15739 https://github.com/siyuan-note/siyuan/issues/10666 2025-09-03 17:37:27 +08:00
file.go 🔒 XSS through emoji name https://github.com/siyuan-note/siyuan/issues/15034 2025-06-16 10:31:04 +08:00
filetree.go 🧑‍💻 https://github.com/siyuan-note/siyuan/issues/16083 2025-10-13 17:16:25 +08:00
format.go ♻️ Refactor Go to err != nil, err == nil (#12385) 2024-09-04 09:40:50 +08:00
graph.go ♻️ Refactor Go to err != nil, err == nil (#12385) 2024-09-04 09:40:50 +08:00
history.go 🎨 Improve search highlighting https://github.com/siyuan-note/siyuan/issues/13343 2024-12-05 10:11:25 +08:00
icon.go 🎨 Clean code 2025-08-26 21:16:15 +08:00
import.go 🎨 Support importing markdown zip on the browser (#14950) 2025-06-02 21:14:04 +08:00
inbox.go ♻️ Refactor Go to err != nil, err == nil (#12385) 2024-09-04 09:40:50 +08:00
lute.go 🎨 https://github.com/siyuan-note/siyuan/issues/15866 2025-09-18 16:46:50 +08:00
network.go ♻️ Refactor Go to err != nil, err == nil (#12385) 2024-09-04 09:40:50 +08:00
notebook.go 🎨 Trim space in dialynote/block ref/new doc save path https://github.com/siyuan-note/siyuan/issues/14482 2025-03-31 15:29:59 +08:00
notification.go 🎨 https://github.com/siyuan-note/siyuan/issues/10153 2024-01-11 20:13:25 +08:00
outline.go 🎨 Improve export preview mode https://github.com/siyuan-note/siyuan/issues/11981 2024-09-18 11:28:04 +08:00
pandoc.go ♻️ Refactor Go to err != nil, err == nil (#12385) 2024-09-04 09:40:50 +08:00
petal.go 🧑‍💻 Add field disabledInPublish to the marketplace package metadata to indicate whether it is disabled in the publishing service https://github.com/siyuan-note/siyuan/issues/11730 2025-09-04 10:29:58 +08:00
ref.go 🎨 Improve backmention highlighting https://github.com/siyuan-note/siyuan/issues/13328 2024-12-13 10:42:04 +08:00
repo.go 🎨 Automatic purge for local data repo https://github.com/siyuan-note/siyuan/issues/13091 2024-11-17 01:33:21 +08:00
riff.go ♻️ Improve transaction flush 2024-10-22 19:21:04 +08:00
router.go Improve the outline panel (#15814) 2025-10-15 10:01:47 +08:00
search.go 🎨 Change Search asset content and Add watermark to exported PDF or image from paid features to free features 2025-10-09 23:01:21 +08:00
setting.go 🎨 History Retention Days supports a maximum setting of 3650 https://github.com/siyuan-note/siyuan/issues/15979 2025-09-29 22:22:15 +08:00
snippet.go 🎨 Add field disabledInPublish to the code snippet to indicate whether it is disabled in the publish service https://github.com/siyuan-note/siyuan/issues/15806 2025-09-09 09:18:12 +08:00
sql.go 🎨 Add internal kernel API /api/sqlite/flushTransaction https://github.com/siyuan-note/siyuan/issues/10005 2024-11-19 22:53:18 +08:00
storage.go Improve the outline panel (#15814) 2025-10-15 10:01:47 +08:00
sync.go 🎨 Improve import S3/WebDAV conf https://github.com/siyuan-note/siyuan/issues/13718 2025-01-04 21:26:30 +08:00
system.go 🎨 Manually optimize the data index to reduce space usage and improve performance https://github.com/siyuan-note/siyuan/issues/15663 2025-08-25 10:40:28 +08:00
tag.go 🎨 API getTag add an optional parameter ignoreMaxListHint https://github.com/siyuan-note/siyuan/issues/16000 2025-10-03 21:59:19 +08:00
template.go 🔒 Some security vulnerabilities https://github.com/siyuan-note/siyuan/issues/13426 2024-12-11 17:30:14 +08:00
transaction.go ♻️ Improve transaction flush 2024-10-22 19:21:04 +08:00
ui.go 🧑‍💻 Add internal kernel API /api/ui/reloadIcon https://github.com/siyuan-note/siyuan/issues/16008 2025-10-03 15:50:43 +08:00
workspace.go 🎨 Prompt when the user attempts to create a workspace in the root directory of the disk https://github.com/siyuan-note/siyuan/issues/15976 2025-09-29 12:23:33 +08:00