solidity as active plugin when code is loaded from url param

pull/5370/head
lianahus 4 years ago committed by ioedeveloper
parent 973f1ca987
commit a7036c4593
  1. 12
      apps/remix-ide/src/app.js
  2. 4
      apps/remix-ide/src/framingService.js

@ -495,8 +495,13 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
console.log(e)
}
// If plugins are loaded from the URL params, we focus on the last one.
if (pluginLoader.current === 'queryParams' && workspace.length > 0) menuicons.select(workspace[workspace.length - 1])
if (params.code) {
// if code is given in url we focus on solidity plugin
menuicons.select('solidity')
} else {
// If plugins are loaded from the URL params, we focus on the last one.
if (pluginLoader.current === 'queryParams' && workspace.length > 0) menuicons.select(workspace[workspace.length - 1])
}
if (params.call) {
const callDetails = params.call.split('//')
@ -516,7 +521,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const framingService = new FramingService(sidePanel, menuicons, mainview, this._components.resizeFeature)
if (params.embed) framingService.embed()
if (params.code) framingService.code()
framingService.start(params)
if (params.code) frameingService.code()
}

@ -41,8 +41,4 @@ export class FramingService {
this.mainView.minimizeTerminal()
this.resizeFeature.hidePanel()
}
code () {
this.verticalIcons.select('solidity')
}
}

Loading…
Cancel
Save