Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update plugins in homepage #2787

Merged
merged 2 commits into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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