This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new fe72075e3 feat: add beta badge for plugin (#7178)
fe72075e3 is described below

commit fe72075e3732c08f125d3c6c821beb2bf42b70a4
Author: 青湛 <[email protected]>
AuthorDate: Fri Mar 15 19:12:50 2024 +1300

    feat: add beta badge for plugin (#7178)
---
 config-ui/src/plugins/register/azure/config.tsx            |  3 ++-
 config-ui/src/plugins/register/bitbucket-server/config.tsx |  3 ++-
 config-ui/src/routes/connection/connections.tsx            |  2 ++
 config-ui/src/routes/connection/styled.ts                  | 11 +++++++++++
 4 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/config-ui/src/plugins/register/azure/config.tsx 
b/config-ui/src/plugins/register/azure/config.tsx
index 873fa54f3..c2157a90b 100644
--- a/config-ui/src/plugins/register/azure/config.tsx
+++ b/config-ui/src/plugins/register/azure/config.tsx
@@ -76,9 +76,10 @@ export const AzureConfig: IPluginConfig = {
 
 export const AzureGoConfig: IPluginConfig = {
   plugin: 'azuredevops_go',
-  name: 'Azure DevOps Go(beta)',
+  name: 'Azure DevOps Go',
   icon: ({ color }) => <Icon fill={color} />,
   sort: 1,
+  isBeta: true,
   connection: {
     docLink: DOC_URL.PLUGIN.AZUREDEVOPS.BASIS,
     fields: [
diff --git a/config-ui/src/plugins/register/bitbucket-server/config.tsx 
b/config-ui/src/plugins/register/bitbucket-server/config.tsx
index 6691921f6..21fa96353 100644
--- a/config-ui/src/plugins/register/bitbucket-server/config.tsx
+++ b/config-ui/src/plugins/register/bitbucket-server/config.tsx
@@ -23,9 +23,10 @@ import Icon from './assets/icon.svg?react';
 
 export const BitbucketServerConfig: IPluginConfig = {
   plugin: 'bitbucket_server',
-  name: 'Bitbucket Server(beta)',
+  name: 'Bitbucket Server',
   icon: ({ color }) => <Icon fill={color} />,
   sort: 3,
+  isBeta: true,
   connection: {
     docLink: DOC_URL.PLUGIN.BITBUCKET_SERVER.BASIS,
     fields: [
diff --git a/config-ui/src/routes/connection/connections.tsx 
b/config-ui/src/routes/connection/connections.tsx
index f88beff58..776089b0a 100644
--- a/config-ui/src/routes/connection/connections.tsx
+++ b/config-ui/src/routes/connection/connections.tsx
@@ -90,6 +90,7 @@ export const Connections = () => {
           const connectionCount = connections.filter((cs) => cs.plugin === 
plugin).length;
           return (
             <li key={plugin} onClick={() => handleShowListDialog(plugin)}>
+              {pluginConfig.isBeta && <span className="beta">Beta</span>}
               <span className="logo">{pluginConfig.icon({ color: colorPrimary 
})}</span>
               <span className="name">{pluginConfig.name}</span>
               <span className="count">
@@ -110,6 +111,7 @@ export const Connections = () => {
           const connectionCount = connections.filter((cs) => cs.plugin === 
plugin).length;
           return (
             <li key={plugin} onClick={() => handleShowListDialog(plugin)}>
+              {pluginConfig.isBeta && <span className="beta">Beta</span>}
               <span className="logo">{pluginConfig.icon({ color: colorPrimary 
})}</span>
               <span className="name">{pluginConfig.name}</span>
               <span className="count">
diff --git a/config-ui/src/routes/connection/styled.ts 
b/config-ui/src/routes/connection/styled.ts
index a3bb3ccd8..6aa45c948 100644
--- a/config-ui/src/routes/connection/styled.ts
+++ b/config-ui/src/routes/connection/styled.ts
@@ -67,6 +67,17 @@ export const Wrapper = styled.div<{ theme: string }>`
       background-color: #eeeeee;
     }
 
+    & > .beta {
+      position: absolute;
+      top: 0;
+      right: 0;
+      padding: 4px 8px;
+      font-size: 12px;
+      color: #fff;
+      background-color: #f5a623;
+      border-radius: 8px;
+    }
+
     & > .logo {
       width: 60px;
       height: 60px;

Reply via email to