Skip to content

Commit

Permalink
update plugins in homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Apr 29, 2020
1 parent 3bd3563 commit 43c136e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Binary file added assets/img/mythxLogo.webp
Binary file not shown.
Binary file added assets/img/sourceVerifyLogo.webp
Binary file not shown.
21 changes: 18 additions & 3 deletions src/app/ui/landing-page/landing-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,15 @@ export class LandingPage extends ViewPlugin {
this.appManager.ensureActivated('udapp')
this.verticalIcons.select('vyper')
}
/*
const startWorkshop = () => {
this.appManager.ensureActivated('box')
this.appManager.ensureActivated('solidity')
this.appManager.ensureActivated('solidityUnitTesting')
this.appManager.ensureActivated('workshops')
this.verticalIcons.select('workshops')
}
*/

const startPipeline = () => {
this.appManager.ensureActivated('solidity')
Expand All @@ -154,6 +156,16 @@ export class LandingPage extends ViewPlugin {
this.appManager.ensureActivated('debugger')
this.verticalIcons.select('debugger')
}
const startMythX = () => {
this.appManager.ensureActivated('solidity')
this.appManager.ensureActivated('mythx')
this.verticalIcons.select('mythx')
}
const startSourceVerify = () => {
this.appManager.ensureActivated('solidity')
this.appManager.ensureActivated('source-verification')
this.verticalIcons.select('source-verification')
}
const startPluginManager = () => {
this.appManager.ensureActivated('pluginManager')
this.verticalIcons.select('pluginManager')
Expand Down Expand Up @@ -195,15 +207,17 @@ export class LandingPage extends ViewPlugin {
// Featured
const pipelineEnv = createEnvButton('assets/img/pipelineLogo.webp', 'pipelineLogo', 'Pipeline', startPipeline)
const debuggerEnv = createEnvButton('assets/img/debuggerLogo.webp', 'debuggerLogo', 'Debugger', startDebugger)
const workshopEnv = createEnvButton('assets/img/workshopLogo.webp', 'workshopLogo', 'Workshop', startWorkshop)
const mythXEnv = createEnvButton('assets/img/mythxLogo.webp', 'mythxLogo', 'MythX', startMythX)
const SourceVerifyEnv = createEnvButton('assets/img/sourceVerifyLogo.webp', 'sourceVerifyLogo', 'Source Verify', startSourceVerify)
const moreEnv = createEnvButton('assets/img/moreLogo.webp', 'moreLogo', 'More', startPluginManager)

const invertNum = (globalRegistry.get('themeModule').api.currentTheme().quality === 'dark') ? 1 : 0
solEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})`
vyperEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})`
pipelineEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})`
debuggerEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})`
workshopEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})`
mythXEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})`
SourceVerifyEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})`
moreEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})`

let switchToPreviousVersion = () => {
Expand Down Expand Up @@ -265,8 +279,9 @@ export class LandingPage extends ViewPlugin {
<h4>Featured Plugins</h4>
<div class="d-flex flex-row pt-2">
${pipelineEnv}
${mythXEnv}
${SourceVerifyEnv}
${debuggerEnv}
${workshopEnv}
${moreEnv}
</div>
</div>
Expand Down

0 comments on commit 43c136e

Please sign in to comment.