mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 12:48:30 +00:00
perf: auto load icons (#688)
* perf: icon * perf: icon * doc * perf: simple edit ui * doc * doc * doc * doc
This commit is contained in:
@@ -8,7 +8,7 @@ import { feConfigs } from '@/web/common/system/staticData';
|
||||
import NextLink from 'next/link';
|
||||
import Badge from '../Badge';
|
||||
import Avatar from '../Avatar';
|
||||
import MyIcon from '../Icon';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import MyTooltip from '../MyTooltip';
|
||||
@@ -29,8 +29,8 @@ const Navbar = ({ unread }: { unread: number }) => {
|
||||
() => [
|
||||
{
|
||||
label: t('navbar.Chat'),
|
||||
icon: 'chat',
|
||||
activeIcon: 'chatFill',
|
||||
icon: 'core/chat/chatLight',
|
||||
activeIcon: 'chatcore/dataset/chatFillFill',
|
||||
link: `/chat?appId=${lastChatAppId}&chatId=${lastChatId}`,
|
||||
activeLink: ['/chat']
|
||||
},
|
||||
@@ -50,26 +50,15 @@ const Navbar = ({ unread }: { unread: number }) => {
|
||||
},
|
||||
{
|
||||
label: t('navbar.Datasets'),
|
||||
icon: 'dbLight',
|
||||
activeIcon: 'dbFill',
|
||||
icon: 'core/dataset/datasetLight',
|
||||
activeIcon: 'core/dataset/datasetFill',
|
||||
link: `/dataset/list`,
|
||||
activeLink: ['/dataset/list', '/dataset/detail']
|
||||
},
|
||||
...(feConfigs?.show_appStore
|
||||
? [
|
||||
{
|
||||
label: t('navbar.Store'),
|
||||
icon: 'appStoreLight',
|
||||
activeIcon: 'appStoreFill',
|
||||
link: '/appStore',
|
||||
activeLink: ['/appStore']
|
||||
}
|
||||
]
|
||||
: []),
|
||||
{
|
||||
label: t('navbar.Account'),
|
||||
icon: 'meLight',
|
||||
activeIcon: 'meFill',
|
||||
icon: 'support/user/userLight',
|
||||
activeIcon: 'support/user/userFill',
|
||||
link: '/account',
|
||||
activeLink: ['/account']
|
||||
}
|
||||
@@ -191,7 +180,7 @@ const Navbar = ({ unread }: { unread: number }) => {
|
||||
mt={0}
|
||||
color={'#9096a5'}
|
||||
>
|
||||
<MyIcon name={'git'} width={'22px'} height={'22px'} />
|
||||
<MyIcon name={'common/gitLight'} width={'22px'} height={'22px'} />
|
||||
</Link>
|
||||
</MyTooltip>
|
||||
)}
|
||||
|
@@ -4,7 +4,7 @@ import { Flex, Box } from '@chakra-ui/react';
|
||||
import { useChatStore } from '@/web/core/chat/storeChat';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import Badge from '../Badge';
|
||||
import MyIcon from '../Icon';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
|
||||
const NavbarPhone = ({ unread }: { unread: number }) => {
|
||||
const router = useRouter();
|
||||
@@ -14,7 +14,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
||||
() => [
|
||||
{
|
||||
label: t('navbar.Chat'),
|
||||
icon: 'chat',
|
||||
icon: 'core/chat/chatLight',
|
||||
link: `/chat?appId=${lastChatAppId}&chatId=${lastChatId}`,
|
||||
activeLink: ['/chat'],
|
||||
unread: 0
|
||||
@@ -28,14 +28,14 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
||||
},
|
||||
{
|
||||
label: t('navbar.Tools'),
|
||||
icon: 'tabbarMore',
|
||||
icon: 'phoneTabbar/tabbarMore',
|
||||
link: '/tools',
|
||||
activeLink: ['/tools'],
|
||||
unread: 0
|
||||
},
|
||||
{
|
||||
label: t('navbar.Account'),
|
||||
icon: 'tabbarMe',
|
||||
icon: 'phoneTabbar/tabbarMe',
|
||||
link: '/account',
|
||||
activeLink: ['/account'],
|
||||
unread
|
||||
|
Reference in New Issue
Block a user