use config app

pull/1860/head
bunsenstraat 3 years ago committed by yann300
parent f433b8e6cb
commit 211287de2f
  1. 11
      apps/solidity-compiler/src/app/compiler.ts
  2. 2
      libs/remix-lib/src/types/ICompilerApi.ts

@ -59,15 +59,12 @@ export class CompilerClientApi extends CompilerApiMixin(PluginClient) implements
}
}
getAppParameter (name) {
const param = localStorage.getItem(name) || defaultAppParameters[name]
if (param === 'true') return true
if (param === 'false') return false
return param
async getAppParameter (name) {
return await PluginClient.call('config', 'getAppParameter', name)
}
setAppParameter (name, value) {
localStorage.setItem(name, value)
async setAppParameter (name, value) {
await PluginClient.call('config', 'setAppParameter', name, value)
}
getFileManagerMode () {

@ -11,7 +11,7 @@ export interface ICompilerApi {
getCompilerParameters: () => ConfigurationSettings
setCompilerParameters: (ConfigurationSettings?) => void
getAppParameter: (value: string) => string | boolean
getAppParameter: (value: string) => Promise<any>
setAppParameter: (name: string, value: string | boolean) => void
getFileManagerMode: () => string

Loading…
Cancel
Save