From 0c1a2e7f6f6ea57784725f2b61b6cced442fb83e Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Mon, 30 Mar 2020 02:40:35 +0000 Subject: [PATCH] Removed copyFiles from other parts of remix-ide --- src/app/files/file-explorer.js | 30 ---------------------- src/app/panels/file-panel.js | 2 +- src/app/panels/styles/file-panel-styles.js | 9 ------- 3 files changed, 1 insertion(+), 40 deletions(-) diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index dd9a68c75b..850fc92cb6 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -563,36 +563,6 @@ fileExplorer.prototype.packageFiles = function (filesProvider, directory, callba }) } -// ------------------ copy files -------------- -fileExplorer.prototype.copyFiles = function () { - let self = this - modalDialogCustom.prompt( - 'Copy files from browser explorer', - 'To which other remix-ide instance do you want to copy over all files?', - 'https://remix.ethereum.org', - (target) => { - doCopy(target) - } - ) - function doCopy (target) { - // package only files from the browser storage. - self.packageFiles(self.files, '/', (error, packaged) => { - if (error) { - console.log(error) - } else { - let iframe = yo` - - ` - iframe.onload = function () { - iframe.contentWindow.postMessage(['loadFiles', packaged], '*') - tooltip('Files copied successfully.') - } - document.querySelector('body').appendChild(iframe) - } - }) - } -} - fileExplorer.prototype.createNewFile = function (parentFolder = 'browser') { let self = this modalDialogCustom.prompt('Create new file', 'File Name (e.g Untitled.sol)', 'Untitled.sol', (input) => { diff --git a/src/app/panels/file-panel.js b/src/app/panels/file-panel.js index 6ebf715fdd..9ded1bcaac 100644 --- a/src/app/panels/file-panel.js +++ b/src/app/panels/file-panel.js @@ -57,7 +57,7 @@ module.exports = class Filepanel extends ViewPlugin { return new FileExplorer(self._components.registry, self._deps.fileProviders[key], menuItems) } - var fileExplorer = createProvider('browser', ['createNewFile', 'publishToGist', 'copyFiles', canUpload ? 'uploadFile' : '']) + var fileExplorer = createProvider('browser', ['createNewFile', 'publishToGist', canUpload ? 'uploadFile' : '']) var fileSystemExplorer = createProvider('localhost') self.remixdHandle = new RemixdHandle(fileSystemExplorer, self._deps.fileProviders['localhost'], appManager) diff --git a/src/app/panels/styles/file-panel-styles.js b/src/app/panels/styles/file-panel-styles.js index a2fc6a7c67..4db78296b9 100644 --- a/src/app/panels/styles/file-panel-styles.js +++ b/src/app/panels/styles/file-panel-styles.js @@ -28,15 +28,6 @@ var css = csjs` .gist i:hover { color : orange; } - .copyFiles { - padding : 10px; - } - .copyFiles i { - cursor : pointer; - } - .copyFiles i:hover { - color : orange; - } .connectToLocalhost { padding : 10px; }