fix fileManager mode

pull/1342/head
yann300 3 years ago committed by davidzagi93@gmail.com
parent 8918c5ea57
commit dff1ddac0c
  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 // 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( const run = new RunTab(
blockchain, blockchain,
registry.get('config').api, registry.get('config').api,

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

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

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

Loading…
Cancel
Save