Skip to content

feat: 编辑器增加 redo undo 功能#951

Merged
codexu merged 7 commits intodevfrom
feature/editor-undo-redo
Mar 6, 2026
Merged

feat: 编辑器增加 redo undo 功能#951
codexu merged 7 commits intodevfrom
feature/editor-undo-redo

Conversation

@codexu
Copy link
Copy Markdown
Owner

@codexu codexu commented Mar 6, 2026

No description provided.

codexu and others added 7 commits March 6, 2026 22:01
- 在 Tab 栏左侧添加撤销/重做按钮
- 通过 emitter 事件机制实现 TabBar 与编辑器的通信
- 按钮显示平台对应的快捷键提示

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- 添加按钮禁用状态,根据当前是否可以撤销/重做动态更新
- 使用 TooltipButton 组件,样式与文件管理器一致
- 在编辑器内容变化时自动更新按钮状态
- 加载文件后清空历史记录,避免撤销到空白状态

Co-Authored-By: Claude Opus 4.6 <[email protected]>
将撤销/重做按钮移到滚动容器外部,保持固定在左侧

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- 在设置页面中添加"撤销/重做按钮"开关
- 默认开启显示
- 支持在编辑器设置中控制显示/隐藏

Co-Authored-By: Claude Opus 4.6 <[email protected]>
TabBar 组件直接读取 store 中的配置,无需重启应用

Co-Authored-By: Claude Opus 4.6 <[email protected]>
使用 useSettingStore 替代直接操作 Tauri Store,
确保设置变更立即被 TabBar 组件响应

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Tiptap 编辑器不支持 editor.commands.clearHistory() 方法,
移除相关调用避免运行时错误。

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@codexu codexu merged commit cbe33aa into dev Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant