From 98c7ab5aa8a3fa256724982090b780606a49d5f5 Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 14 Oct 2024 15:03:05 +0200 Subject: [PATCH] new color for Maintained by and adding external maintainers as an option --- .../src/lib/components/homeTabFeaturedPlugins.tsx | 10 +++++----- .../home-tab/src/lib/components/pluginButton.tsx | 12 ++++++++---- .../panel/src/lib/plugins/panel-header.tsx | 14 +++++++++----- .../src/lib/components/ActivePluginCard.tsx | 11 ++++++++++- .../src/lib/components/InactivePluginCard.tsx | 15 ++++++++++++--- 5 files changed, 44 insertions(+), 18 deletions(-) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx index 10cf7d82bc..199a141ee7 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx @@ -122,7 +122,7 @@ function HomeTabFeaturedPlugins({ plugin }: HomeTabFeaturedPluginsProps) { description={intl.formatMessage({ id: 'home.codeAnalyizerPluginDesc' })} - remixMaintained={true} + maintainedBy='Remix' callback={() => startCodeAnalyzer()} /> startLearnEth()} /> startCookbook()} /> startSolidity()} /> startSolidityUnitTesting()} /> diff --git a/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx b/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx index 2a3e8d5040..35afc6ca17 100644 --- a/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx @@ -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 {l2 && } - {remixMaintained ? ( + { maintainedBy?.toLowerCase() === 'remix' ? ( }> + ) : + maintainedBy ? + ( + ) : (}> - + ) } diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx index 2f21cf8fc1..252dc50152 100644 --- a/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx +++ b/libs/remix-ui/panel/src/lib/plugins/panel-header.tsx @@ -48,12 +48,16 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => {
- {plugin?.profile?.maintainedBy?.toLowerCase() === 'remix' ? ( - }> - + { plugin?.profile?.maintainedBy?.toLowerCase() === 'remix' ? ( + }> + + ) : + plugin?.profile?.maintainedBy ? + ( + ) - : (}> - + : (}> + ) }
diff --git a/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx b/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx index 4d1e29bd49..15e7bc462f 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx @@ -26,13 +26,22 @@ function ActivePluginCard({ profile, buttonText, deactivatePlugin }: PluginCardP > ) + : profile?.maintainedBy ? ( + + + ) : (} > - + ) } {profile.documentation && ( diff --git a/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx b/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx index 1dec1c420c..8fadf18222 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx @@ -37,19 +37,28 @@ function InactivePluginCard({ profile, buttonText, activatePlugin }: PluginCardP {profile?.maintainedBy?.toLowerCase() == 'remix' ? ( } > ) + : profile?.maintainedBy ? ( + + + ) : (} > - + ) } {profile.documentation && (