fix: next config (#4207)
* reset package * i18n * update config * i18n * remove log
This commit is contained in:
parent
37f4dd3f27
commit
1bda5b5e58
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@ -462,6 +462,9 @@ importers:
|
||||
'@fortaine/fetch-event-source':
|
||||
specifier: ^3.0.6
|
||||
version: 3.0.6
|
||||
'@node-rs/jieba':
|
||||
specifier: 2.0.1
|
||||
version: 2.0.1
|
||||
'@tanstack/react-query':
|
||||
specifier: ^4.24.10
|
||||
version: 4.36.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
|
||||
@ -80,7 +80,12 @@ const nextConfig = {
|
||||
transpilePackages: ['@fastgpt/global', '@fastgpt/web', 'ahooks'],
|
||||
experimental: {
|
||||
// 优化 Server Components 的构建和运行,避免不必要的客户端打包。
|
||||
serverComponentsExternalPackages: ['mongoose', 'pg', '@zilliz/milvus2-sdk-node', 'tiktoken'],
|
||||
serverComponentsExternalPackages: [
|
||||
'mongoose',
|
||||
'pg',
|
||||
'@zilliz/milvus2-sdk-node',
|
||||
"tiktoken",
|
||||
],
|
||||
outputFileTracingRoot: path.join(__dirname, '../../'),
|
||||
instrumentationHook: true
|
||||
}
|
||||
|
||||
@ -64,6 +64,7 @@
|
||||
"request-ip": "^3.3.0",
|
||||
"sass": "^1.58.3",
|
||||
"use-context-selector": "^1.4.4",
|
||||
"@node-rs/jieba": "2.0.1",
|
||||
"zustand": "^4.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -3,30 +3,32 @@ import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
||||
import { useI18n } from '@/web/context/I18n';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import { i18nT } from '@fastgpt/web/i18n/utils';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
const AppTypeTag = ({ type }: { type: AppTypeEnum }) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const map = useRef({
|
||||
[AppTypeEnum.simple]: {
|
||||
label: i18nT('app:type.Simple bot'),
|
||||
label: t('app:type.Simple bot'),
|
||||
icon: 'core/app/type/simple',
|
||||
bg: '#DBF3FF',
|
||||
color: '#0884DD'
|
||||
},
|
||||
[AppTypeEnum.workflow]: {
|
||||
label: i18nT('app:type.Workflow bot'),
|
||||
label: t('app:type.Workflow bot'),
|
||||
icon: 'core/app/type/workflow',
|
||||
bg: '#E4E1FC',
|
||||
color: '#6F5DD7'
|
||||
},
|
||||
[AppTypeEnum.plugin]: {
|
||||
label: i18nT('app:type.Plugin'),
|
||||
label: t('app:type.Plugin'),
|
||||
icon: 'core/app/type/plugin',
|
||||
bg: '#D0F5EE',
|
||||
color: '#007E7C'
|
||||
},
|
||||
[AppTypeEnum.httpPlugin]: {
|
||||
label: i18nT('app:type.Http plugin'),
|
||||
label: t('app:type.Http plugin'),
|
||||
icon: 'core/app/type/httpPlugin',
|
||||
bg: '#FFE4EE',
|
||||
color: '#E82F72'
|
||||
|
||||
@ -2,7 +2,7 @@ import Markdown from '@/components/Markdown';
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { Dispatch, MutableRefObject, SetStateAction, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useCopyData } from '@fastgpt/web/hooks/useCopyData';
|
||||
import InputDataModal from '@/pageComponents/dataset/detail/InputDataModal';
|
||||
|
||||
@ -3,7 +3,7 @@ import { SearchDataResponseItemType } from '@fastgpt/global/core/dataset/type';
|
||||
import { getSourceNameIcon } from '@fastgpt/global/core/dataset/utils';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import DownloadButton from './DownloadButton';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { downloadFetch } from '@/web/common/system/utils';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import MyMenu from '@fastgpt/web/components/common/MyMenu';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import MyIconButton from '@fastgpt/web/components/common/Icon/button';
|
||||
|
||||
const DownloadButton = ({
|
||||
|
||||
@ -4,7 +4,7 @@ import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import ScoreTag from './ScoreTag';
|
||||
import Markdown from '@/components/Markdown';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useCopyData } from '@fastgpt/web/hooks/useCopyData';
|
||||
|
||||
const QuoteItem = ({
|
||||
|
||||
@ -2,7 +2,7 @@ import { Box, Flex } from '@chakra-ui/react';
|
||||
import { SearchDataResponseItemType } from '@fastgpt/global/core/dataset/type';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import QuoteItem from './QuoteItem';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
@ -2,7 +2,7 @@ import { ScoreItemType, scoreTheme } from '@/components/core/dataset/QuoteItem';
|
||||
import { Box, Flex, Progress } from '@chakra-ui/react';
|
||||
import { SearchScoreTypeMap } from '@fastgpt/global/core/dataset/constants';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
const ScoreTag = (score: { primaryScore?: ScoreItemType; secondaryScore: ScoreItemType[] }) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@ -36,19 +36,19 @@ import MyNumberInput from '@fastgpt/web/components/common/Input/NumberInput';
|
||||
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
import { shadowLight } from '@fastgpt/web/styles/theme';
|
||||
import { DatasetPageContext } from '@/web/core/dataset/context/datasetPageContext';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
|
||||
function DataProcess() {
|
||||
const { t } = useTranslation();
|
||||
const { feConfigs } = useSystemStore();
|
||||
const { toast } = useToast();
|
||||
|
||||
const { goToNext, processParamsForm, chunkSizeField, minChunkSize, maxChunkSize } =
|
||||
useContextSelector(DatasetImportContext, (v) => v);
|
||||
const datasetDetail = useContextSelector(DatasetPageContext, (v) => v.datasetDetail);
|
||||
const { getValues, setValue, register, watch } = processParamsForm;
|
||||
const { setValue, register, watch } = processParamsForm;
|
||||
|
||||
const trainingType = watch('trainingType');
|
||||
const chunkSettingMode = watch('chunkSettingMode');
|
||||
const qaPrompt = watch('qaPrompt');
|
||||
|
||||
const {
|
||||
isOpen: isOpenCustomPrompt,
|
||||
@ -65,7 +65,7 @@ function DataProcess() {
|
||||
value: key as DatasetCollectionDataProcessModeEnum,
|
||||
tooltip: t(value.tooltip as any)
|
||||
}));
|
||||
}, []);
|
||||
}, [t]);
|
||||
|
||||
const Title = useCallback(({ title }: { title: string }) => {
|
||||
return (
|
||||
@ -284,7 +284,7 @@ function DataProcess() {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{getValues('qaPrompt')}
|
||||
{qaPrompt}
|
||||
|
||||
<Box
|
||||
display={'none'}
|
||||
@ -333,44 +333,6 @@ function DataProcess() {
|
||||
</AccordionPanel>
|
||||
</AccordionItem>
|
||||
|
||||
{/* <AccordionItem mt={4} border={'none'}>
|
||||
<Title title={t('dataset:import_model_config')} />
|
||||
<AccordionPanel p={2} fontSize={'sm'}>
|
||||
<Box>
|
||||
<Box>{t('common:core.ai.model.Dataset Agent Model')}</Box>
|
||||
<Box mt={1}>
|
||||
<AIModelSelector
|
||||
w={'100%'}
|
||||
value={llmModel}
|
||||
list={datasetModelList.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.model
|
||||
}))}
|
||||
onChange={(e) => {
|
||||
setValue('llmModel', e);
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box pt={5}>
|
||||
<Box>{t('dataset:vllm_model')}</Box>
|
||||
<Box mt={1}>
|
||||
<AIModelSelector
|
||||
w={'100%'}
|
||||
value={vlmModel}
|
||||
list={vllmModelList.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.model
|
||||
}))}
|
||||
onChange={(e) => {
|
||||
setValue('vlmModel', e);
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
</AccordionPanel>
|
||||
</AccordionItem> */}
|
||||
|
||||
<Flex mt={5} gap={3} justifyContent={'flex-end'}>
|
||||
<Button
|
||||
onClick={() => {
|
||||
@ -385,7 +347,7 @@ function DataProcess() {
|
||||
|
||||
{isOpenCustomPrompt && (
|
||||
<PromptTextarea
|
||||
defaultValue={getValues('qaPrompt')}
|
||||
defaultValue={qaPrompt}
|
||||
onChange={(e) => {
|
||||
setValue('qaPrompt', e);
|
||||
}}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { Box } from '@chakra-ui/react';
|
||||
import { TrackEventName } from '@/web/common/system/constants';
|
||||
|
||||
@ -3,7 +3,7 @@ import ApiKeyTable from '@/components/support/apikey/Table';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { Box } from '@chakra-ui/react';
|
||||
import AccountContainer, { TabEnum } from '@/pageComponents/account/AccountContainer';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
|
||||
const ApiKey = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@ -6,7 +6,7 @@ import { useTranslation } from 'next-i18next';
|
||||
import ApplyInvoiceModal from '@/pageComponents/account/bill/ApplyInvoiceModal';
|
||||
import { useRouter } from 'next/router';
|
||||
import AccountContainer from '@/pageComponents/account/AccountContainer';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
|
||||
export enum InvoiceTabEnum {
|
||||
bill = 'bill',
|
||||
|
||||
@ -39,7 +39,7 @@ import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
import { useSystem } from '@fastgpt/web/hooks/useSystem';
|
||||
import { getWebReqUrl } from '@fastgpt/web/common/system/utils';
|
||||
import AccountContainer from '@/pageComponents/account/AccountContainer';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { useRouter } from 'next/router';
|
||||
import TeamSelector from '@/pageComponents/account/TeamSelector';
|
||||
import { getWorkorderURL } from '@/web/common/workorder/api';
|
||||
|
||||
@ -7,7 +7,7 @@ import { useLoading } from '@fastgpt/web/hooks/useLoading';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import EmptyTip from '@fastgpt/web/components/common/EmptyTip';
|
||||
import AccountContainer from '@/pageComponents/account/AccountContainer';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
|
||||
const InformTable = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import AccountContainer from '@/pageComponents/account/AccountContainer';
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
|
||||
@ -26,7 +26,7 @@ import { useLoading } from '@fastgpt/web/hooks/useLoading';
|
||||
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
import EmptyTip from '@fastgpt/web/components/common/EmptyTip';
|
||||
import AccountContainer from '@/pageComponents/account/AccountContainer';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
|
||||
const Promotion = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@ -10,7 +10,7 @@ import { UserUpdateParams } from '@/types/user';
|
||||
import TimezoneSelect from '@fastgpt/web/components/common/MySelect/TimezoneSelect';
|
||||
import I18nLngSelector from '@/components/Select/I18nLngSelector';
|
||||
import AccountContainer from '@/pageComponents/account/AccountContainer';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
|
||||
const Individuation = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import AccountContainer from '@/pageComponents/account/AccountContainer';
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import Icon from '@fastgpt/web/components/common/Icon';
|
||||
|
||||
@ -9,7 +9,7 @@ import dynamic from 'next/dynamic';
|
||||
import { useState, useMemo } from 'react';
|
||||
import WorkflowVariableModal from '@/pageComponents/account/thirdParty/WorkflowVariableModal';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { GET } from '@/web/common/api/request';
|
||||
import type { checkUsageResponse } from '@/pages/api/support/user/team/thirtdParty/checkUsage';
|
||||
|
||||
@ -9,7 +9,7 @@ import { useTranslation } from 'next-i18next';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
import AccountContainer from '@/pageComponents/account/AccountContainer';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { useScrollPagination } from '@fastgpt/web/hooks/useScrollPagination';
|
||||
import { getTeamMembers } from '@/web/support/user/team/api';
|
||||
import FillRowTabs from '@fastgpt/web/components/common/Tabs/FillRowTabs';
|
||||
|
||||
@ -26,7 +26,7 @@ const updateData = async () => {
|
||||
console.log('更新分词完成');
|
||||
break;
|
||||
}
|
||||
console.log('读取数据完成', Date.now() - time);
|
||||
|
||||
const dataTextOps: AnyBulkWriteOperation<DatasetDataTextSchemaType>[] = [];
|
||||
const datasetDataIds: string[] = [];
|
||||
|
||||
@ -46,7 +46,6 @@ const updateData = async () => {
|
||||
console.log(`分词处理错误: ${item._id}`, error);
|
||||
}
|
||||
}
|
||||
console.log('分词处理完成', Date.now() - time);
|
||||
|
||||
await mongoSessionRun(async (session) => {
|
||||
if (dataTextOps.length > 0) {
|
||||
@ -62,7 +61,6 @@ const updateData = async () => {
|
||||
);
|
||||
}
|
||||
});
|
||||
console.log('保存完成', Date.now() - time);
|
||||
|
||||
success += dataTextOps.length;
|
||||
console.log(`成功 ${success}`);
|
||||
|
||||
@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
|
||||
import { Box } from '@chakra-ui/react';
|
||||
import dynamic from 'next/dynamic';
|
||||
import Loading from '@fastgpt/web/components/common/MyLoading';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import NextHead from '@/components/common/NextHead';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
import AppContextProvider, { AppContext } from '@/pageComponents/app/detail/context';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { Box, Flex, Button, useDisclosure, Input, InputGroup } from '@chakra-ui/react';
|
||||
import { AddIcon } from '@chakra-ui/icons';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import dynamic from 'next/dynamic';
|
||||
|
||||
@ -15,7 +15,7 @@ import ChatHistorySlider from '@/pageComponents/chat/ChatHistorySlider';
|
||||
import SliderApps from '@/pageComponents/chat/SliderApps';
|
||||
import ChatHeader from '@/pageComponents/chat/ChatHeader';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { getChatTitleFromChatMessage } from '@fastgpt/global/core/chat/utils';
|
||||
import { GPTMessages2Chats } from '@fastgpt/global/core/chat/adapt';
|
||||
import { getMyApps } from '@/web/core/app/api';
|
||||
|
||||
@ -11,7 +11,7 @@ import type { StartChatFnProps } from '@/components/core/chat/ChatContainer/type
|
||||
import PageContainer from '@/components/PageContainer';
|
||||
import ChatHeader from '@/pageComponents/chat/ChatHeader';
|
||||
import ChatHistorySlider from '@/pageComponents/chat/ChatHistorySlider';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { getInitOutLinkChatInfo } from '@/web/core/chat/api';
|
||||
import { getChatTitleFromChatMessage } from '@fastgpt/global/core/chat/utils';
|
||||
|
||||
@ -8,7 +8,7 @@ import PageContainer from '@/components/PageContainer';
|
||||
import { getMyTokensApps } from '@/web/core/chat/api';
|
||||
import ChatHistorySlider from '@/pageComponents/chat/ChatHistorySlider';
|
||||
import ChatHeader from '@/pageComponents/chat/ChatHeader';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import ChatBox from '@/components/core/chat/ChatContainer/ChatBox';
|
||||
import type { StartChatFnProps } from '@/components/core/chat/ChatContainer/type';
|
||||
|
||||
@ -5,7 +5,7 @@ import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
import dynamic from 'next/dynamic';
|
||||
import PageContainer from '@/components/PageContainer';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import MetaDataCard from '@/pageComponents/dataset/detail/MetaDataCard';
|
||||
import NavBar from '@/pageComponents/dataset/detail/NavBar';
|
||||
|
||||
@ -2,7 +2,7 @@ import React, { useCallback, useMemo, useState } from 'react';
|
||||
import { Box, Flex, Button, InputGroup, InputLeftElement, Input } from '@chakra-ui/react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import ParentPaths from '@/components/common/folder/Path';
|
||||
import List from '@/pageComponents/dataset/list/List';
|
||||
import { DatasetsContext } from './context';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import React, { useEffect } from 'react';
|
||||
import Loading from '@fastgpt/web/components/common/MyLoading';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
@ -6,7 +6,7 @@ import { clearToken } from '@/web/support/user/auth';
|
||||
import { postFastLogin } from '@/web/support/user/api';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import Loading from '@fastgpt/web/components/common/MyLoading';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
const FastLogin = ({
|
||||
|
||||
@ -17,7 +17,7 @@ import { useRouter } from 'next/router';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { useChatStore } from '@/web/core/chat/context/useChatStore';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { clearToken } from '@/web/support/user/auth';
|
||||
import Script from 'next/script';
|
||||
import Loading from '@fastgpt/web/components/common/MyLoading';
|
||||
|
||||
@ -7,7 +7,7 @@ import { clearToken } from '@/web/support/user/auth';
|
||||
import { oauthLogin } from '@/web/support/user/api';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import Loading from '@fastgpt/web/components/common/MyLoading';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { OAuthEnum } from '@fastgpt/global/support/user/constant';
|
||||
|
||||
@ -4,7 +4,7 @@ import { ChevronRightIcon } from '@chakra-ui/icons';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { getDocPath } from '@/web/common/system/doc';
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { Box, Flex, HStack, VStack } from '@chakra-ui/react';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { getTeamPlanStatus } from '@/web/support/user/team/api';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { serviceSideProps } from '@/web/common/system/nextjs';
|
||||
import { serviceSideProps } from '@/web/common/i18n/utils';
|
||||
import { getPluginGroups, getSystemPlugTemplates } from '@/web/core/app/api/plugin';
|
||||
import { Box, Flex, Grid, useDisclosure } from '@chakra-ui/react';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
|
||||
@ -9,7 +9,7 @@ export const serviceSideProps = async (content: any, ns: I18nNsType = []) => {
|
||||
const deviceSize = content.req?.cookies?.NEXT_DEVICE_SIZE || null;
|
||||
|
||||
return {
|
||||
...(await serverSideTranslations(lang, ['common', ...ns], null, extraLng)),
|
||||
...(await serverSideTranslations(lang, ['common', ...ns], undefined, extraLng)),
|
||||
deviceSize
|
||||
};
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user