remove config provider

pull/3094/head
yann300 6 years ago
parent f247a39f12
commit d8bdf25ce3
  1. 6
      src/app.js
  2. 3
      src/app/files/fileManager.js
  3. 7
      src/app/panels/file-panel.js

@ -17,7 +17,6 @@ var GistHandler = require('./lib/gist-handler')
var helper = require('./lib/helper')
var Storage = remixLib.Storage
var Browserfiles = require('./app/files/browser-files')
var BrowserfilesTree = require('./app/files/browser-files-tree')
var SharedFolder = require('./app/files/shared-folder')
var Config = require('./config')
var Renderer = require('./app/ui/renderer')
@ -140,10 +139,7 @@ class App extends ApiFactory {
self._components.filesProviders = {}
self._components.filesProviders['browser'] = new Browserfiles(fileStorage)
self._components.filesProviders['config'] = new BrowserfilesTree('config', configStorage)
self._components.filesProviders['config'].init()
registry.put({api: self._components.filesProviders['browser'], name: 'fileproviders/browser'})
registry.put({api: self._components.filesProviders['config'], name: 'fileproviders/config'})
var remixd = new Remixd(65520)
registry.put({api: remixd, name: 'remixd'})
@ -465,7 +461,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
compileTab
)
let sourceHighlighters = registry.get('editor').api.sourceHighlighters
let configProvider = self._components.filesProviders['config']
appManager.init([
this.api(),
@ -473,7 +468,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
udapp.api(),
fileManager.api(),
sourceHighlighters.api(),
configProvider.api(),
txListenerModule.api(),
filePanel.api(),
// { profile: support.profile(), api: support },

@ -26,18 +26,15 @@ class FileManager extends ApiFactory {
config: this._components.registry.get('config').api,
browserExplorer: this._components.registry.get('fileproviders/browser').api,
localhostExplorer: this._components.registry.get('fileproviders/localhost').api,
configExplorer: this._components.registry.get('fileproviders/config').api,
gistExplorer: this._components.registry.get('fileproviders/gist').api,
filesProviders: this._components.registry.get('fileproviders').api
}
this._deps.browserExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) })
this._deps.localhostExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) })
this._deps.configExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) })
this._deps.gistExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) })
this._deps.browserExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) })
this._deps.localhostExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) })
this._deps.configExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) })
this._deps.gistExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) })
this._deps.localhostExplorer.event.register('errored', (event) => { this.removeTabsOf(this._deps.localhostExplorer) })
this._deps.localhostExplorer.event.register('closed', (event) => { this.removeTabsOf(this._deps.localhostExplorer) })

@ -47,7 +47,6 @@ module.exports = class Filepanel extends ApiFactory {
var swarmExplorer = new FileExplorer(self._components.registry, self._deps.fileProviders['swarm'])
var githubExplorer = new FileExplorer(self._components.registry, self._deps.fileProviders['github'])
var gistExplorer = new FileExplorer(self._components.registry, self._deps.fileProviders['gist'], ['updateGist'])
var configExplorer = new FileExplorer(self._components.registry, self._deps.fileProviders['config'])
var httpExplorer = new FileExplorer(self._components.registry, self._deps.fileProviders['http'])
var httpsExplorer = new FileExplorer(self._components.registry, self._deps.fileProviders['https'])
@ -72,7 +71,6 @@ module.exports = class Filepanel extends ApiFactory {
<div class="${css.fileexplorer}">
<div>
<div class=${css.treeview}>${fileExplorer.init()}</div>
<div class="configexplorer ${css.treeview}">${configExplorer.init()}</div>
<div class="filesystemexplorer ${css.treeview}">${fileSystemExplorer.init()}</div>
<div class="swarmexplorer ${css.treeview}">${swarmExplorer.init()}</div>
<div class="githubexplorer ${css.treeview}">${githubExplorer.init()}</div>
@ -89,7 +87,6 @@ module.exports = class Filepanel extends ApiFactory {
self.event = event
var element = template()
fileExplorer.ensureRoot()
configExplorer.ensureRoot()
self._deps.fileProviders['localhost'].event.register('connecting', (event) => {
})
@ -109,10 +106,6 @@ module.exports = class Filepanel extends ApiFactory {
self._deps.fileManager.switchFile(path)
})
configExplorer.events.register('focus', function (path) {
self._deps.fileManager.switchFile(path)
})
fileSystemExplorer.events.register('focus', function (path) {
self._deps.fileManager.switchFile(path)
})

Loading…
Cancel
Save