fix: 重构新建项目逻辑,选定文件夹即项目

- 移除 prompt() 及 InputDialog 组件依赖
- 选定文件夹直接创建 .web2app 项目结构
- 默认以文件夹名作为项目名称
- 在编辑器中可自由修改名称、版本、图标、入口等配置
- 增强导入资源入口的文案提示
This commit is contained in:
gmh01
2026-07-23 20:40:45 +08:00
parent 686d94e178
commit 8dc102a7cb
8 changed files with 34 additions and 42 deletions

View File

@@ -13,7 +13,7 @@ contextBridge.exposeInMainWorld('api', {
readTree: (dirPath) => ipcRenderer.invoke('dir:readTree', dirPath)
},
project: {
create: (name, dir) => ipcRenderer.invoke('project:create', name, dir),
create: (projectPath) => ipcRenderer.invoke('project:create', projectPath),
load: (projectPath) => ipcRenderer.invoke('project:load', projectPath),
save: (projectPath, data) => ipcRenderer.invoke('project:save', projectPath, data),
importFiles: (projectPath, files) => ipcRenderer.invoke('project:importFiles', projectPath, files),