mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 20:58:12 +00:00
v4.5.1 (#417)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useToast } from '@chakra-ui/react';
|
||||
import { useUserStore } from '@/web/support/store/user';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
|
||||
const unAuthPage: { [key: string]: boolean } = {
|
||||
|
@@ -2,14 +2,14 @@ import React, { useEffect, useMemo } from 'react';
|
||||
import { Box, useColorMode, Flex } from '@chakra-ui/react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useLoading } from '@/web/common/hooks/useLoading';
|
||||
import { useGlobalStore } from '@/web/common/store/global';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { throttle } from 'lodash';
|
||||
import Auth from './auth';
|
||||
import Navbar from './navbar';
|
||||
import NavbarPhone from './navbarPhone';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useUserStore } from '@/web/support/store/user';
|
||||
import { getUnreadCount } from '@/web/support/api/user';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { getUnreadCount } from '@/web/support/user/api';
|
||||
|
||||
const pcUnShowLayoutRoute: Record<string, boolean> = {
|
||||
'/': true,
|
||||
@@ -30,7 +30,7 @@ const Layout = ({ children }: { children: JSX.Element }) => {
|
||||
const router = useRouter();
|
||||
const { colorMode, setColorMode } = useColorMode();
|
||||
const { Loading } = useLoading();
|
||||
const { loading, setScreenWidth, isPc, loadGitStar } = useGlobalStore();
|
||||
const { loading, setScreenWidth, isPc, loadGitStar } = useSystemStore();
|
||||
const { userInfo } = useUserStore();
|
||||
|
||||
const isChatPage = useMemo(
|
||||
|
@@ -1,16 +1,16 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { Box, Flex, Link } from '@chakra-ui/react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useUserStore } from '@/web/support/store/user';
|
||||
import { useChatStore } from '@/web/core/store/chat';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { useChatStore } from '@/web/core/chat/storeChat';
|
||||
import { HUMAN_ICON } from '@/constants/chat';
|
||||
import { feConfigs } from '@/web/common/store/static';
|
||||
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 { useTranslation } from 'next-i18next';
|
||||
import { useGlobalStore } from '@/web/common/store/global';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import MyTooltip from '../MyTooltip';
|
||||
|
||||
export enum NavbarTypeEnum {
|
||||
@@ -22,7 +22,7 @@ const Navbar = ({ unread }: { unread: number }) => {
|
||||
const { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
const { userInfo } = useUserStore();
|
||||
const { gitStar } = useGlobalStore();
|
||||
const { gitStar } = useSystemStore();
|
||||
const { lastChatAppId, lastChatId } = useChatStore();
|
||||
const navbarList = useMemo(
|
||||
() => [
|
||||
@@ -44,8 +44,8 @@ const Navbar = ({ unread }: { unread: number }) => {
|
||||
label: t('navbar.Datasets'),
|
||||
icon: 'dbLight',
|
||||
activeIcon: 'dbFill',
|
||||
link: `/kb/list`,
|
||||
activeLink: ['/kb/list', '/kb/detail']
|
||||
link: `/dataset/list`,
|
||||
activeLink: ['/dataset/list', '/dataset/detail']
|
||||
},
|
||||
...(feConfigs?.show_appStore
|
||||
? [
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { Flex, Box } from '@chakra-ui/react';
|
||||
import { useChatStore } from '@/web/core/store/chat';
|
||||
import { useChatStore } from '@/web/core/chat/storeChat';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import Badge from '../Badge';
|
||||
import MyIcon from '../Icon';
|
||||
|
Reference in New Issue
Block a user