Merge pull request #3836 from ethereum/homepage-plugins

add/remove plugins
pull/5370/head
yann300 1 year ago committed by GitHub
commit 2df8431925
  1. 2
      apps/remix-ide/src/app/tabs/analysis-tab.js
  2. 2
      apps/remix-ide/src/app/tabs/locales/en/home.json
  3. BIN
      apps/remix-ide/src/assets/img/cookbook.webp
  4. 61
      libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx

@ -10,7 +10,7 @@ var EventManager = require('../../lib/events')
const profile = {
name: 'solidityStaticAnalysis',
displayName: 'Solidity static analysis',
displayName: 'Solidity Analyzers',
methods: [],
events: [],
icon: 'assets/img/staticAnalysis.webp',

@ -19,6 +19,8 @@
"home.betaTestingMore": "Sign up",
"home.featuredPlugins": "Featured Plugins",
"home.solidityPluginDesc": "Compile, test and analyse smart contract.",
"home.cookbookDesc": "Find smart contracts, solidity libraries, and discover protocols.",
"home.codeAnalyizerPluginDesc": "Analyze your code using Remix, Sohint and Sslither",
"home.starkNetPluginDesc": "Compile and deploy contracts with Cairo, a native language for StarkNet.",
"home.solhintPluginDesc": "Solhint is an open source project for linting Solidity code.",
"home.sourcifyPluginDesc": "Solidity contract and metadata verification service.",

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -63,33 +63,27 @@ function HomeTabFeaturedPlugins ({plugin}: HomeTabFeaturedPluginsProps) {
plugin.verticalIcons.select('solidity')
_paq.push(['trackEvent', 'hometabActivate', 'userActivate', 'solidity'])
}
const startOneClickDapp = async () => {
await plugin.appManager.activatePlugin('oneClickDapp')
plugin.verticalIcons.select('oneClickDapp')
_paq.push(['trackEvent', 'hometabActivate', 'userActivate', 'oneClickDapp'])
}
const startSolhint = async () => {
await plugin.appManager.activatePlugin(['solidity', 'solhint'])
plugin.verticalIcons.select('solhint')
_paq.push(['trackEvent', 'hometabActivate', 'userActivate', 'solhint'])
const startCodeAnalyzer = async () => {
await plugin.appManager.activatePlugin(['solidity', 'solidityStaticAnalysis'])
plugin.verticalIcons.select('solidityStaticAnalysis')
_paq.push(['trackEvent', 'hometabActivate', 'userActivate', 'solidityStaticAnalysis'])
}
const startSourceVerify = async () => {
await plugin.appManager.activatePlugin(['solidity', 'sourcify'])
plugin.verticalIcons.select('sourcify')
_paq.push(['trackEvent', 'hometabActivate', 'userActivate', 'sourcify'])
}
const startCookbook = async () => {
await plugin.appManager.activatePlugin(['cookbook.dev'])
plugin.verticalIcons.select('cookbook.dev')
_paq.push(['trackEvent', 'hometabActivate', 'userActivate', 'cookbook.dev'])
}
const startSolidityUnitTesting = async () => {
await plugin.appManager.activatePlugin(['solidity', 'solidityUnitTesting'])
plugin.verticalIcons.select('solidityUnitTesting')
_paq.push(['trackEvent', 'hometabActivate', 'userActivate', 'solidityUnitTesting'])
}
const startDgit = async () => {
await plugin.appManager.activatePlugin('dgit')
plugin.verticalIcons.select('dgit')
_paq.push(['tracEvent', 'hometabActivate', 'userActivate', 'dgit'])
}
return (
<div className="pl-2 w-100" id="hTFeaturedPlugins">
<label className="" style={{fontSize: "1.2rem"}}><FormattedMessage id='home.featuredPlugins' /></label>
@ -124,6 +118,22 @@ function HomeTabFeaturedPlugins ({plugin}: HomeTabFeaturedPluginsProps) {
deviceType={"desktop"}
itemClass="w-100"
>
<PluginButton
imgPath="assets/img/staticAnalysis.webp"
envID="staticAnalysisLogo"
envText="Solidity Analyzers"
description={intl.formatMessage({ id: 'home.codeAnalyizerPluginDesc' })}
remixMaintained={true}
callback={() => startCodeAnalyzer() }
/>
<PluginButton
imgPath="assets/img/cookbook.webp"
envID="cookbookLogo"
envText="Cookbook"
description={intl.formatMessage({ id: 'home.cookbookDesc' })}
remixMaintained={false}
callback={() => startCookbook()}
/>
<PluginButton
imgPath="assets/img/solidityLogo.webp"
envID="solidityLogo"
@ -132,12 +142,6 @@ function HomeTabFeaturedPlugins ({plugin}: HomeTabFeaturedPluginsProps) {
remixMaintained={true}
callback={() => startSolidity()}
/>
<PluginButton
imgPath="assets/img/solhintLogo.webp"
envID="solhintLogo" envText="Solhint linter"
description={intl.formatMessage({ id: 'home.solhintPluginDesc' })}
callback={() => startSolhint()}
/>
<PluginButton
imgPath="assets/img/sourcifyNewLogo.webp"
envID="sourcifyLogo"
@ -145,21 +149,6 @@ function HomeTabFeaturedPlugins ({plugin}: HomeTabFeaturedPluginsProps) {
description={intl.formatMessage({ id: 'home.sourcifyPluginDesc' })}
callback={() => startSourceVerify()}
/>
<PluginButton
imgPath="assets/img/dgit.webp"
envID="dgitLogo"
envText="Dgit"
description={intl.formatMessage({ id: 'home.dgitPluginDesc' })}
remixMaintained={true}
callback={() => startDgit()}
/>
<PluginButton
imgPath="assets/img/oneclickdapp.webp"
envID="oneClickDappLogo"
envText="OneClickDapp"
description={intl.formatMessage({ id: 'home.oneClickDappDesc' })}
callback={() => startOneClickDapp()}
/>
<PluginButton
imgPath="assets/img/unitTesting.webp"
envID="sUTLogo"

Loading…
Cancel
Save