Update: 添加mixly2-api

This commit is contained in:
王立帮
2024-07-21 10:11:34 +08:00
parent 189de53fb0
commit 4de91b3b01
3 changed files with 64 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ goog.require('Mixly.Title');
goog.require('Mixly.LocalStorage');
goog.require('Mixly.Storage');
goog.require('Mixly.Debug');
goog.require('Mixly.API2');
goog.require('Mixly.Electron.LibManager');
goog.require('Mixly.Electron.File');
goog.require('Mixly.WebSocket.Socket');
@@ -31,6 +32,7 @@ const {
LocalStorage,
Storage,
Debug,
API2,
Electron = {},
Web = {},
WebSocket = {}
@@ -39,6 +41,8 @@ const {
const { LibManager, File } = goog.isElectron? Electron : Web;
const { Socket } = WebSocket;
Mixly.Editor = Mixly.Editor ?? {};
window.addEventListener('load', () => {
const app = new App($('body')[0]);
@@ -98,6 +102,7 @@ Loader.init = () => {
Loader.restoreBlocks(editor);
Mixly.app.removeSkeleton();
window.addEventListener('unload', () => Loader.backupBlocks(editor), false);
API2.init();
}
Loader.restoreBlocks = (editor) => {