|
|
@ -240,6 +240,7 @@ class PluginLoader { |
|
|
|
get currentLoader () { |
|
|
|
get currentLoader () { |
|
|
|
return this.loaders[this.current] |
|
|
|
return this.loaders[this.current] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
constructor () { |
|
|
|
constructor () { |
|
|
|
const queryParams = new QueryParams() |
|
|
|
const queryParams = new QueryParams() |
|
|
|
this.donotAutoReload = ['remixd'] // that would be a bad practice to force loading some plugins at page load.
|
|
|
|
this.donotAutoReload = ['remixd'] // that would be a bad practice to force loading some plugins at page load.
|
|
|
@ -250,15 +251,13 @@ class PluginLoader { |
|
|
|
localStorage.setItem('workspace', JSON.stringify(actives)) |
|
|
|
localStorage.setItem('workspace', JSON.stringify(actives)) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
get: () => { |
|
|
|
get: () => { return JSON.parse(localStorage.getItem('workspace')) } |
|
|
|
return JSON.parse(localStorage.getItem('workspace')) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.loaders['queryParams'] = { |
|
|
|
this.loaders['queryParams'] = { |
|
|
|
set: () => {}, |
|
|
|
set: () => {}, |
|
|
|
get: () => { |
|
|
|
get: () => { |
|
|
|
let plugins = queryParams.get()['plugins'] |
|
|
|
const { plugins } = queryParams.get() |
|
|
|
if (!plugins) return [] |
|
|
|
if (!plugins) return [] |
|
|
|
return plugins.split(',') |
|
|
|
return plugins.split(',') |
|
|
|
} |
|
|
|
} |
|
|
@ -268,10 +267,10 @@ class PluginLoader { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
set (plugin, actives) { |
|
|
|
set (plugin, actives) { |
|
|
|
this.currentLoader().set(plugin, actives) |
|
|
|
this.currentLoader.set(plugin, actives) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
get () { |
|
|
|
get () { |
|
|
|
return this.currentLoader().get() |
|
|
|
return this.currentLoader.get() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|