Update: WebSocket下MicroPython板卡支持管理板卡文件

This commit is contained in:
王立帮
2024-12-03 19:00:17 +08:00
parent 6dff4d2a98
commit c3212fecb1
6 changed files with 392 additions and 5 deletions

View File

@@ -1,17 +1,34 @@
goog.loadJs('common', () => {
goog.require('Mixly.Env');
goog.require('Mixly.FileTree');
goog.require('Mixly.Electron.AmpyFS');
goog.require('Mixly.Web.AmpyFS');
goog.require('Mixly.WebSocket.AmpyFS');
goog.provide('Mixly.AmpyFileTree');
const {
Env,
FileTree,
Electron = {},
Web = {}
Web = {},
WebSocket = {}
} = Mixly;
const { AmpyFS } = goog.isElectron? Electron : Web;
let currentObj = null;
if (goog.isElectron) {
currentObj = Electron;
} else {
if (Env.hasSocketServer) {
currentObj = WebSocket;
} else {
currentObj = Web;
}
}
const { AmpyFS } = currentObj;
class AmpyFileTree extends FileTree {