mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 03:48:24 +00:00
4.8.9 test fix (#2291)
* perf: read file icon * perf:icon * fix: i18n * perf: hide pro api * perf: upload expired time * perf: upload file frequency limit * perf: upload file ux * perf: input file tip * perf: qa custom chunk size * feat: dataset openapi * fix: auth dataset list * fix: openapi doc * perf: zero temperature change to 0.01 * perf: read file prompt * perf: read file prompt * perf: free plan tip * feat: cron job usage
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
import { defaultDatasetDetail } from '../constants';
|
||||
import { DatasetUpdateBody } from '@fastgpt/global/core/dataset/api';
|
||||
import { DatasetItemType, DatasetTagType } from '@fastgpt/global/core/dataset/type';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
|
||||
type DatasetPageContextType = {
|
||||
datasetId: string;
|
||||
@@ -83,6 +84,7 @@ export const DatasetPageContextProvider = ({
|
||||
datasetId: string;
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { feConfigs } = useSystemStore();
|
||||
|
||||
// dataset detail
|
||||
const [datasetDetail, setDatasetDetail] = useState(defaultDatasetDetail);
|
||||
@@ -123,6 +125,8 @@ export const DatasetPageContextProvider = ({
|
||||
const [allDatasetTags, setAllDatasetTags] = useState<DatasetTagType[]>([]);
|
||||
|
||||
const loadAllDatasetTags = async ({ id }: { id: string }) => {
|
||||
if (!feConfigs?.isPlus) return;
|
||||
|
||||
const { list } = await getAllTags(id);
|
||||
setAllDatasetTags(list);
|
||||
};
|
||||
|
@@ -4,7 +4,6 @@ import { UserAuthTypeEnum } from '@fastgpt/global/support/user/auth/constants';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { i18nT } from '@fastgpt/web/i18n/utils';
|
||||
let timer: NodeJS.Timeout;
|
||||
|
||||
export const useSendCode = () => {
|
||||
@@ -29,8 +28,8 @@ export const useSendCode = () => {
|
||||
}, 1000);
|
||||
},
|
||||
{
|
||||
successToast: i18nT('user:password.code_sended'),
|
||||
errorToast: i18nT('user:password.code_send_error'),
|
||||
successToast: t('user:password.code_sended'),
|
||||
errorToast: t('user:password.code_send_error'),
|
||||
refreshDeps: [codeCountDown, feConfigs?.googleClientVerKey]
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user