fix: 修复短篇人物概览标题未只读及空标题保存报错问题 - #6
Open
zhiwu215 wants to merge 1 commit into
Open
Conversation
Owner
|
很快检查合并 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5
核心改动
RightEditorPane.vue中完善isTitleReadOnly计算属性,将短篇人物概览(characterFileKind === 'overview')及剧情阶段(plotStageOrder)纳入只读保护,禁止用户误点击和编辑。useCatalogDocumentPersistence.ts和编辑器手动保存中增加非空标题校验,自动保存检测到空标题时静默跳过,避免骚扰弹窗。ui-feedback.ts中增加错误格式化降级,将底层意外冒泡的 Zod JSON 数组自动转译为友好中文提示。改动文件列表
apps/desktop/src/renderer/src/components/RightEditorPane.vue:添加概览只读控制与手动保存非空校验;apps/desktop/src/renderer/src/composables/useCatalogDocumentPersistence.ts:持久化前置拦截空标题;apps/desktop/src/renderer/src/ui-feedback.ts:增加 Zod Issue JSON 转译器;apps/desktop/src/renderer/src/components/RightEditorPane.test.ts:更新只读状态断言测试;apps/desktop/src/renderer/src/ui-feedback.test.ts:新增 UI 错误转译单元测试。