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:
Archer
2024-07-19 14:15:01 +08:00
committed by GitHub
parent 1eedb9caba
commit cf7145ab54
165 changed files with 2643 additions and 557 deletions

View File

@@ -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>