mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00
System plugin (#2091)
* System template (#2082) * feat: system plugin (#2024) * add plugin cost & change plugin avatar (#2030) * add plugin cost & change plugin avatar * add author * feat: duckduckgo plugin * duckduck search * perf: templates select system plugin * perf: system plugin avatar * feat: duckduck plugins * doc * perf: plugin classify * perf: icon avatar component * perf: system template avatar --------- Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com> * feat: system plugin search * perf: plugin packages important * perf: source avatar * nextconfig * perf: i18n * perf: default model * perf: system plugin author --------- Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
|
||||
import { Box, Flex, Grid, Image } from '@chakra-ui/react';
|
||||
import type { FlexProps, GridProps } from '@chakra-ui/react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import MyIcon from '../Icon';
|
||||
import Avatar from '../Avatar';
|
||||
|
||||
type Props<ValueType = string> = Omit<GridProps, 'onChange'> & {
|
||||
list: { icon?: string; label: string | React.ReactNode; value: ValueType }[];
|
||||
@@ -81,14 +81,10 @@ const LightRowTabs = <ValueType = string,>({
|
||||
>
|
||||
{item.icon && (
|
||||
<>
|
||||
{item.icon.startsWith('/') ? (
|
||||
<Image mr={1} src={item.icon} alt={''} w={'16px'} />
|
||||
) : (
|
||||
<MyIcon mr={1} name={item.icon as any} w={'16px'} />
|
||||
)}
|
||||
<Avatar src={item.icon} alt={''} w={'1.25rem'} borderRadius={'sm'} />
|
||||
</>
|
||||
)}
|
||||
{typeof item.label === 'string' ? t(item.label as any) : item.label}
|
||||
<Box ml={1}>{typeof item.label === 'string' ? t(item.label as any) : item.label}</Box>
|
||||
</Flex>
|
||||
))}
|
||||
</Grid>
|
||||
|
Reference in New Issue
Block a user