Removed copyFiles from other parts of remix-ide

pull/1/head
ioedeveloper 5 years ago committed by Liana Husikyan
parent 8ff4932dec
commit 0c1a2e7f6f
  1. 30
      src/app/files/file-explorer.js
  2. 2
      src/app/panels/file-panel.js
  3. 9
      src/app/panels/styles/file-panel-styles.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 src=${target} style='display:none;'></iframe>
`
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) => {

@ -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)

@ -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;
}

Loading…
Cancel
Save