fix fileManager mode

pull/1342/head
yann300 3 years ago committed by davidzagi93@gmail.com
parent c178808b49
commit 02d3000f81
  1. 2
      apps/remix-ide/src/app.js
  2. 7
      apps/remix-ide/src/app/tabs/compile-tab.js
  3. 6
      apps/solidity-compiler/src/app/compiler-api.ts
  4. 4
      apps/solidity-compiler/src/app/compiler.ts

@ -429,7 +429,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
}
// CONTENT VIEWS & DEFAULT PLUGINS
const compileTab = new CompileTab(registry.get('config').api)
const compileTab = new CompileTab(registry.get('config').api, registry.get('filemanager').api)
const run = new RunTab(
blockchain,
registry.get('config').api,

@ -32,8 +32,9 @@ const profile = {
// - methods: ['getCompilationResult']
class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerApi
constructor (config) {
constructor (config, fileManager) {
super(profile)
this.fileManager
this.config = config
this.queryParams = new QueryParams()
this.compileTabLogic = new CompileTabLogic(this, this.contentImport)
@ -87,6 +88,10 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA
return super.getCompilationResult()
}
getFileManagerMode () {
return this.fileManager.mode
}
/**
* set the compiler configuration
* This function is used by remix-plugin compiler API.

@ -1,6 +1,6 @@
import { compile } from '@remix-project/remix-solidity'
import { CompileTabLogic, parseContracts } from '@remix-ui/solidity-compiler' // eslint-disable-line
import { ConfigurationSettings } from '@remix-project/remix-lib-ts'
import type { ConfigurationSettings } from '@remix-project/remix-lib-ts'
export const CompilerApiMixin = (Base) => class extends Base {
currentFile: string
@ -158,10 +158,6 @@ export const CompilerApiMixin = (Base) => class extends Base {
this.configurationSettings = settings
}
getFileManagerMode () {
return 'browser'
}
fileExists (fileName) {
return this.call('fileManager', 'exists', fileName)
}

@ -68,4 +68,8 @@ export class CompilerClientApi extends CompilerApiMixin(PluginClient) implements
setAppParameter (name, value) {
localStorage.setItem(name, value)
}
getFileManagerMode () {
return 'browser'
}
}

Loading…
Cancel
Save