Feature/Community Node (#2902)

add feature to enable community node
This commit is contained in:
Henry Heng
2024-07-29 16:52:47 +01:00
committed by GitHub
parent b5d969b2bb
commit 27cb143fef
9 changed files with 61 additions and 31 deletions
+40 -26
View File
@@ -491,35 +491,49 @@ const AddNodes = ({ nodesData, node, isAgentCanvas }) => {
<ListItemText
sx={{ ml: 1 }}
primary={
<div
style={{
display: 'flex',
flexDirection: 'row',
alignItems: 'center'
}}
>
<span>{node.label}</span>
&nbsp;
{node.badge && (
<Chip
sx={{
width: 'max-content',
fontWeight: 700,
<>
<div
style={{
display: 'flex',
flexDirection: 'row',
alignItems: 'center'
}}
>
<span>{node.label}</span>
&nbsp;
{node.badge && (
<Chip
sx={{
width: 'max-content',
fontWeight: 700,
fontSize: '0.65rem',
background:
node.badge === 'DEPRECATING'
? theme.palette.warning
.main
: theme.palette.teal
.main,
color:
node.badge !== 'DEPRECATING'
? 'white'
: 'inherit'
}}
size='small'
label={node.badge}
/>
)}
</div>
{node.author && (
<span
style={{
fontSize: '0.65rem',
background:
node.badge === 'DEPRECATING'
? theme.palette.warning.main
: theme.palette.teal.main,
color:
node.badge !== 'DEPRECATING'
? 'white'
: 'inherit'
fontWeight: 700
}}
size='small'
label={node.badge}
/>
>
By {node.author}
</span>
)}
</div>
</>
}
secondary={node.description}
/>