Update: WebSocket下MicroPython板卡支持管理板卡文件
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user