Skip to content

Commit

Permalink
wait select
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Apr 28, 2020
1 parent 5b3a4db commit 2aeee3d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/app/ui/landing-page/landing-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,26 @@ export class LandingPage extends ViewPlugin {

const learnMore = () => { window.open('https://remix-ide.readthedocs.io/en/latest/layout.html', '_blank') }

const waitSelect = (name) => {
let id = setInterval(_ => {
if (this.appManager.isActive(name)) {
clearInterval(id)
this.verticalIcons.select(name)
}
}, 200)
}

const startSolidity = () => {
this.appManager.ensureActivated('solidity')
this.appManager.ensureActivated('udapp')
this.appManager.ensureActivated('solidityStaticAnalysis')
this.appManager.ensureActivated('solidityUnitTesting')
this.verticalIcons.select('solidity')
waitSelect('solidity')
}
const startVyper = () => {
this.appManager.ensureActivated('vyper')
this.appManager.ensureActivated('udapp')
this.verticalIcons.select('vyper')
waitSelect('vyper')
}
/*
const startWorkshop = () => {
Expand All @@ -154,17 +163,17 @@ export class LandingPage extends ViewPlugin {
}
const startDebugger = () => {
this.appManager.ensureActivated('debugger')
this.verticalIcons.select('debugger')
waitSelect('debugger')
}
const startMythX = () => {
this.appManager.ensureActivated('solidity')
this.appManager.ensureActivated('mythx')
this.verticalIcons.select('mythx')
waitSelect('mythx')
}
const startSourceVerify = () => {
this.appManager.ensureActivated('solidity')
this.appManager.ensureActivated('source-verification')
this.verticalIcons.select('source-verification')
waitSelect('source-verification')
}
const startPluginManager = () => {
this.appManager.ensureActivated('pluginManager')
Expand Down
4 changes: 4 additions & 0 deletions src/remixAppManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export class RemixAppManager extends PluginManager {
return await this.permissionHandler.askPermission(this.profiles[from], this.profiles[to], method, message)
}

isActive (plugin) {
return super.isActive(plugin)
}

onPluginActivated (plugin) {
this.pluginLoader.set(plugin, this.actives)
this.event.emit('activate', plugin)
Expand Down

0 comments on commit 2aeee3d

Please sign in to comment.