新增画布导入功能 - #145
Open
lamgience wants to merge 1 commit into
Open
Conversation
新增画布导入能力: - 在画布列表页顶部增加导入按钮,支持选择 .json / .zip 文件。 - 支持将 .json / .zip 文件拖拽到画布列表区域导入。 - 新增 /api/canvases/import 后端接口,导入时生成新的画布 ID,避免覆盖已有画布。 - zip 导入会读取 canvas.json 和 resources-manifest.json,恢复资源引用。 - 资源导入时按文件名、大小和 SHA-256 哈希复用已存在资源,减少重复写入。 - 导入后的画布会放置到当前项目视图附近的空白位置。 - 增加导入进度、成功/失败状态提示,以及 README 使用说明。 验证: - python -m py_compile main.py - node --check static/js/canvas-list.js - git diff --check
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.
说明
这个提交为画布列表页增加独立的画布导入能力,方便用户把已有画布文件恢复到当前项目中。
功能
.json/.zip文件。.json/.zip文件拖拽到画布列表区域导入。/api/canvases/import后端接口,导入时生成新的画布 ID,不覆盖已有画布。canvas.json和resources-manifest.json,并恢复资源引用。修改范围
main.pystatic/canvas-list.htmlstatic/css/canvas-list.cssstatic/js/canvas-list.jsREADME.md验证
python -m py_compile main.pynode --check static/js/canvas-list.jsgit diff --check