From 44ed3482786fe317c0f0a56920fe14d2b2e69bbb Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 4 Dec 2017 16:22:58 +0100 Subject: [PATCH] add file explorer ui --- src/app/panels/file-panel.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/app/panels/file-panel.js b/src/app/panels/file-panel.js index a1c3adf0bb..881fff2cad 100644 --- a/src/app/panels/file-panel.js +++ b/src/app/panels/file-panel.js @@ -128,6 +128,10 @@ function filepanel (appAPI, filesProvider) { var self = this var fileExplorer = new FileExplorer(appAPI, filesProvider['browser']) var fileSystemExplorer = new FileExplorer(appAPI, filesProvider['localhost']) + var swarmExplorer = new FileExplorer(appAPI, filesProvider['swarm']) + var githubExplorer = new FileExplorer(appAPI, filesProvider['github']) + var gistExplorer = new FileExplorer(appAPI, filesProvider['gist']) + var dragbar = yo`
` function remixdDialog () { @@ -174,6 +178,9 @@ function filepanel (appAPI, filesProvider) {
${fileExplorer.init()}
+
${swarmExplorer.init()}
+
${githubExplorer.init()}
+
${gistExplorer.init()}
${dragbar} @@ -221,6 +228,18 @@ function filepanel (appAPI, filesProvider) { appAPI.switchFile(path) }) + swarmExplorer.events.register('focus', function (path) { + appAPI.switchFile(path) + }) + + githubExplorer.events.register('focus', function (path) { + appAPI.switchFile(path) + }) + + gistExplorer.events.register('focus', function (path) { + appAPI.switchFile(path) + }) + self.render = function render () { return element } function uploadFile (event) {