-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 完善了单文件格式转换功能,修复了剪切板黏贴图片相关bug #293
Merged
Merged
Conversation
This file contains 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
- 在 package.json 中添加 jszip 依赖,版本为 ^3.10.1 - jszip 是一个用于处理 ZIP 文件的 JavaScript 库,可能用于文件压缩或解压功能
- 重构 IndexedDBFileSystem 类,优化文件和目录操作逻辑 - 新增目录创建、读取、重命名和删除功能 - 改进文件重命名和删除,支持自动更新父目录条目 - 优化文件下载时的文件名处理,支持保留文件后缀
- 重构文件打开流程,使用 VFileSystem 统一处理文件读取 - 修改文件路径处理逻辑,支持获取文件名和文件名(含后缀) - 更新文件对话框默认文件名,使用 .gp 后缀
- 重构 VFileSystem 类,增加 pullMetaData 和 saveToPath 方法 - 更新 RecentFileManager 和 StageSaveManager,使用新的文件系统方法 - 修改 ControllerDragFile 和 CopyEngine,使用 VFileSystem 替代直接文件操作 - 更新 StageExportEngine 和 SoundService,使用新的文件读写方法 - 重构 fs/com.tsx,提供统一的文件操作接口
- 在 VFileSystem 中添加 clear 方法,用于清除文件系统数据 - 优化 IndexedDBFileSystem 中的 getStore、addEntryToParent 和 clear 方法 - 删除多余的空格和括号,提高代码可读性
- 在加载文件前,增加清除虚拟文件系统的操作 - 在多个地方添加 VFileSystem.clear() 调用,以确保文件切换时清理虚拟文件系统 - 修改文件加载逻辑,只允许加载 .gp 后缀的文件 - 更新错误提示信息,明确指出需要选择 .gp 文件
- 在 dealPngFileDrop 函数中添加 async/await 以确保文件写入操作是异步执行的 - 在 readClipboardItems 函数中添加 await 以确保文件写入操作完成后再继续执行后续代码
- 新增 absolute2Ext 函数,用于将绝对路径转换为文件后缀
- 实现了 RecentFileManager.openLegacyFileByPath 方法,用于打开旧版文件格式 - 在 AppMenu 中添加了"打开旧版文件"选项 - 优化了文件打开流程,支持选择 legacy 文件
- 在英文、简体中文和繁体中文的本地化文件中添加了“Open Legacy Project”及其翻译 - 此更新支持了新开辟的功能,使用户能够从旧版本的文件中打开项目
- 将 Database 图标替换为 FileText 图标 - 优化用户体验和视觉一致性
粘贴板中的图片粘贴在舞台上时还是会报错
不过拖入png文件进入舞台倒是没问题 |
目前已经push到 |
我在想是不是linux不会报blob.bytes is not a function的错?windows会报错 |
已修复图片粘贴 |
revert-290-file-sys 分支上我又继续更新了一些提示 |
master分支上zty更新了monorepo架构,改动比较大。我把master分支合并了进来对齐了一下进度。启动指令变成 pnpm dev:app了 |
好的 |
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
格式文件,会自动加载在json
数据内且存在于json
文件相同文件夹的图片到当前舞台。从旧版打开时项目将被设置为草稿。