new color for Maintained by and adding external maintainers as an option

pull/5288/head
lianahus 1 month ago
parent 8b124483b4
commit 98c7ab5aa8
  1. 10
      libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx
  2. 12
      libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx
  3. 14
      libs/remix-ui/panel/src/lib/plugins/panel-header.tsx
  4. 11
      libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx
  5. 15
      libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx

@ -122,7 +122,7 @@ function HomeTabFeaturedPlugins({ plugin }: HomeTabFeaturedPluginsProps) {
description={intl.formatMessage({
id: 'home.codeAnalyizerPluginDesc'
})}
remixMaintained={true}
maintainedBy='Remix'
callback={() => startCodeAnalyzer()}
/>
<PluginButton
@ -132,7 +132,7 @@ function HomeTabFeaturedPlugins({ plugin }: HomeTabFeaturedPluginsProps) {
description={intl.formatMessage({
id: 'home.learnEthPluginDesc'
})}
remixMaintained={true}
maintainedBy='Remix'
callback={() => startLearnEth()}
/>
<PluginButton
@ -140,7 +140,7 @@ function HomeTabFeaturedPlugins({ plugin }: HomeTabFeaturedPluginsProps) {
envID="cookbookLogo"
envText="Cookbook"
description={intl.formatMessage({ id: 'home.cookbookDesc' })}
remixMaintained={false}
maintainedBy="Cookbook"
callback={() => startCookbook()}
/>
<PluginButton
@ -148,7 +148,7 @@ function HomeTabFeaturedPlugins({ plugin }: HomeTabFeaturedPluginsProps) {
envID="solidityLogo"
envText="Solidity"
description={intl.formatMessage({ id: 'home.solidityPluginDesc' })}
remixMaintained={true}
maintainedBy='Remix'
callback={() => startSolidity()}
/>
<PluginButton
@ -156,7 +156,7 @@ function HomeTabFeaturedPlugins({ plugin }: HomeTabFeaturedPluginsProps) {
envID="sUTLogo"
envText="Solidity unit testing"
description={intl.formatMessage({ id: 'home.unitTestPluginDesc' })}
remixMaintained={true}
maintainedBy='Remix'
callback={() => startSolidityUnitTesting()}
/>
</Carousel>

@ -10,10 +10,10 @@ interface PluginButtonProps {
callback: any
l2?: boolean
description: string
remixMaintained?: boolean
maintainedBy?: string
}
function PluginButton({ imgPath, envID, envText, callback, l2, description, remixMaintained }: PluginButtonProps) {
function PluginButton({ imgPath, envID, envText, callback, l2, description, maintainedBy }: PluginButtonProps) {
const themeFilter = useContext(ThemeContext)
return (
@ -30,12 +30,16 @@ function PluginButton({ imgPath, envID, envText, callback, l2, description, remi
</div>
</button>
{l2 && <label className="bg-light mx-1 px-1 mb-0 mx-2 position-absolute remixui_home_l2Label">L2</label>}
{remixMaintained ? (
{ maintainedBy?.toLowerCase() === 'remix' ? (
<CustomTooltip placement="bottom" tooltipId="overlay-tooltip-by-remix" tooltipText={<FormattedMessage id="home.maintainedByRemix" />}>
<i className="bg-light text-success mx-1 px-1 mb-0 mx-2 position-absolute remixui_home_maintainedLabel fas fa-check"></i>
</CustomTooltip>) :
maintainedBy ?
(<CustomTooltip placement="bottom" tooltipId="overlay-tooltip-external" tooltipText={"Maintained by " + maintainedBy}>
<i aria-hidden="true" className="bg-light mx-1 px-1 mb-0 mx-2 position-absolute remixui_home_maintainedLabel text-secondary far fa-exclamation-circle"></i>
</CustomTooltip>)
: (<CustomTooltip placement="bottom" tooltipId="overlay-tooltip-external" tooltipText={<FormattedMessage id="panel.maintainedExternally" />}>
<i aria-hidden="true" className="bg-light mx-1 px-1 mb-0 mx-2 position-absolute remixui_home_maintainedLabel text-warning far fa-exclamation-circle"></i>
<i aria-hidden="true" className="bg-light mx-1 px-1 mb-0 mx-2 position-absolute remixui_home_maintainedLabel text-secondary far fa-exclamation-circle"></i>
</CustomTooltip>)
}
</div>

@ -48,12 +48,16 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => {
</h6>
<div className="d-flex flex-row">
<div className="d-flex flex-row">
{plugin?.profile?.maintainedBy?.toLowerCase() === 'remix' ? (
<CustomTooltip placement="auto-end" tooltipId="maintainedByTooltip" tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id="panel.maintainedByRemix" />}>
<i aria-hidden="true" className="text-success mt-1 px-1 fas fa-check"></i>
{ plugin?.profile?.maintainedBy?.toLowerCase() === 'remix' ? (
<CustomTooltip placement="auto" tooltipId="maintainedByTooltipRemix" tooltipText={<FormattedMessage id="home.maintainedByRemix" />}>
<i className="bg-light text-success mx-1 px-1 mb-0 mx-2 position-absolute remixui_home_maintainedLabel fas fa-check"></i>
</CustomTooltip>) :
plugin?.profile?.maintainedBy ?
(<CustomTooltip placement="auto" tooltipId={"maintainedByTooltip" + plugin?.profile?.maintainedBy} tooltipText={"Maintained by " + plugin?.profile?.maintainedBy}>
<i aria-hidden="true" className="mt-1 px-1 text-secondary far fa-exclamation-circle"></i>
</CustomTooltip>)
: (<CustomTooltip placement="auto-end" tooltipId="maintainedExternally" tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id="panel.maintainedExternally" />}>
<i aria-hidden="true" className="mt-1 px-1 text-warning far fa-exclamation-circle"></i>
: (<CustomTooltip placement="auto" tooltipId="maintainedByTooltipRemixUnknown" tooltipText={<FormattedMessage id="panel.maintainedExternally" />}>
<i aria-hidden="true" className="mt-1 px-1 text-secondary far fa-exclamation-circle"></i>
</CustomTooltip>)
}
</div>

@ -26,13 +26,22 @@ function ActivePluginCard({ profile, buttonText, deactivatePlugin }: PluginCardP
>
<i aria-hidden="true" className="px-1 text-success fas fa-check"></i>
</CustomTooltip>)
: profile?.maintainedBy ? (
<CustomTooltip
placement="right"
tooltipId="pluginManagerActiveTitleByRemix"
tooltipClasses="text-nowrap"
tooltipText={"Maintained by " + profile?.maintainedBy}
>
<i aria-hidden="true" className="px-1 text-secondary far fa-exclamation-circle"></i>
</CustomTooltip>)
: (<CustomTooltip
placement="right"
tooltipId="pluginManagerActiveTitleExternally"
tooltipClasses="text-nowrap"
tooltipText={<FormattedMessage id="pluginManager.maintainedExternally" />}
>
<i aria-hidden="true" className="px-1 text-warning far fa-exclamation-circle"></i>
<i aria-hidden="true" className="px-1 text-secondary far fa-exclamation-circle"></i>
</CustomTooltip>)
}
{profile.documentation && (

@ -37,19 +37,28 @@ function InactivePluginCard({ profile, buttonText, activatePlugin }: PluginCardP
{profile?.maintainedBy?.toLowerCase() == 'remix' ? (
<CustomTooltip
placement="right"
tooltipId="pluginManagerInactiveTitleByRemix"
tooltipId="pluginManagerActiveTitleByRemix"
tooltipClasses="text-nowrap"
tooltipText={<FormattedMessage id="pluginManager.maintainedByRemix" />}
>
<i aria-hidden="true" className="px-1 text-success fas fa-check"></i>
</CustomTooltip>)
: profile?.maintainedBy ? (
<CustomTooltip
placement="right"
tooltipId="pluginManagerActiveTitleByRemix"
tooltipClasses="text-nowrap"
tooltipText={"Maintained by " + profile?.maintainedBy}
>
<i aria-hidden="true" className="px-1 text-secondary far fa-exclamation-circle"></i>
</CustomTooltip>)
: (<CustomTooltip
placement="right"
tooltipId="pluginManagerInactiveTitleExternally"
tooltipId="pluginManagerActiveTitleExternally"
tooltipClasses="text-nowrap"
tooltipText={<FormattedMessage id="pluginManager.maintainedExternally" />}
>
<i aria-hidden="true" className="px-1 text-warning far fa-exclamation-circle"></i>
<i aria-hidden="true" className="px-1 text-secondary far fa-exclamation-circle"></i>
</CustomTooltip>)
}
{profile.documentation && (

Loading…
Cancel
Save