fix(web): 修复 .soon/模板加载、旧文件兼容与另存为离开提示

- 删除 design1 ui 遗留代码,修复加载竞态与新建不弹保存提示
- cloud-files 归一化旧版 .soon,IndexedDB 写入完成后再跳转设计页
- 模板/本地 .soon 首次保存须另存为,离开前统一确认
- 发版缓存 bust(version.js、soon-cache.js)及宝塔 Nginx 配置文档

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24kycj
2026-06-29 00:30:20 +08:00
parent efeb3bcc41
commit ce76bb8018
27 changed files with 648 additions and 254 deletions
+9 -16
View File
@@ -1278,22 +1278,6 @@ function getAbsoluteXY(_obj) {
return [_obj.get('left'), _obj.get('top')]
}
$('#open').click(function () {
if (step.val == 0) {
OpenDialog();
return;
}
layer.confirm(
language_str('whetherSave'),
function (index) {
if (typeof window.output === 'function') {
window.output(OpenDialog);
}
layer.close(index);
},
function (index) {
OpenDialog();
}
)
function OpenDialog() {
var dialogApi = (typeof dialog !== 'undefined' && dialog) ? dialog : (window.platformBridge && window.platformBridge.showOpenDialog ? { showOpenDialog: function(opts) { return window.platformBridge.showOpenDialog(opts); } } : null);
if (!dialogApi) return;
@@ -1333,12 +1317,21 @@ $('#open').click(function () {
})
.catch(function(err) {});
}
if (typeof window.soonConfirmLeaveThen === 'function') {
window.soonConfirmLeaveThen(OpenDialog);
} else {
OpenDialog();
}
})
function goFirstPage() {
if (window.platformBridge && window.platformBridge.openFirstPage) window.platformBridge.openFirstPage();
else if (ipcRenderer && ipcRenderer.send) ipcRenderer.send('open-first-page');
}
$('#new').click(function () {
if (typeof window.soonConfirmLeaveThen === 'function') {
window.soonConfirmLeaveThen(goFirstPage);
return;
}
if (step.val == 0) {
goFirstPage();
return;