feat(core): 主页面添加新配置项 自动恢复上次编辑状态

This commit is contained in:
王立帮
2025-09-24 22:08:03 +08:00
parent b5b2a7422d
commit 851bb60057
8 changed files with 25 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ goog.loadJs('common', () => {
goog.require('path');
goog.require('d3');
goog.require('Mixly.Config');
goog.require('Mixly.Env');
goog.require('Mixly.Boards');
goog.require('Mixly.App');
@@ -41,6 +42,7 @@ const {
} = Mixly;
const { LibManager, File } = goog.isElectron? Electron : Web;
const { USER } = Config;
window.addEventListener('load', () => {
@@ -107,7 +109,9 @@ Loader.init = () => {
Mixly.app.getNav().resize();
const workspace = Mixly.app.getWorkspace();
const editor = workspace.getEditorsManager().getActive();
Loader.restoreBlocks(editor);
if (USER.cache !== 'no') {
Loader.restoreBlocks(editor);
}
Mixly.app.removeSkeleton();
window.addEventListener('unload', () => Loader.backupBlocks(editor), false);
API2.init();

View File

@@ -656,6 +656,7 @@
"require": [
"path",
"d3",
"Mixly.Config",
"Mixly.Env",
"Mixly.Boards",
"Mixly.App",