{/* {item.memberName} | */}
{dayjs(item.time).format('YYYY/MM/DD HH:mm:ss')} |
- {BillSourceMap[item.source]?.label} |
+ {t(BillSourceMap[item.source]?.label)} |
{t(item.appName) || '-'} |
{item.total}元 |
diff --git a/projects/app/src/pages/account/components/Info.tsx b/projects/app/src/pages/account/components/Info.tsx
index cce6c795e35..a957475beb4 100644
--- a/projects/app/src/pages/account/components/Info.tsx
+++ b/projects/app/src/pages/account/components/Info.tsx
@@ -13,14 +13,14 @@ import {
} from '@chakra-ui/react';
import { useForm } from 'react-hook-form';
import { UserUpdateParams } from '@/types/user';
-import { useToast } from '@/web/common/hooks/useToast';
+import { useToast } from '@fastgpt/web/hooks/useToast';
import { useUserStore } from '@/web/support/user/useUserStore';
import type { UserType } from '@fastgpt/global/support/user/type.d';
import { useQuery } from '@tanstack/react-query';
import dynamic from 'next/dynamic';
import { useSelectFile } from '@/web/common/file/hooks/useSelectFile';
import { compressImgFileAndUpload } from '@/web/common/file/controller';
-import { feConfigs, systemVersion } from '@/web/common/system/staticData';
+import { useSystemStore } from '@/web/common/system/useSystemStore';
import { useTranslation } from 'next-i18next';
import { timezoneList } from '@fastgpt/global/common/time/timezone';
import Avatar from '@/components/Avatar';
@@ -44,6 +44,7 @@ const SubDatasetModal = dynamic(() => import('@/components/support/wallet/SubDat
const UserInfo = () => {
const theme = useTheme();
const router = useRouter();
+ const { feConfigs, systemVersion } = useSystemStore();
const { t, i18n } = useTranslation();
const { userInfo, updateUserInfo, initUserInfo } = useUserStore();
const timezones = useRef(timezoneList());
@@ -122,12 +123,11 @@ const UserInfo = () => {
}
});
- const { data: datasetSub = { maxSize: 0, usedSize: 0 } } = useQuery(
- ['getTeamDatasetValidSub'],
- getTeamDatasetValidSub
- );
+ const {
+ data: teamSubPlan = { totalPoints: 0, usedPoints: 0, datasetMaxSize: 800, usedDatasetSize: 0 }
+ } = useQuery(['getTeamDatasetValidSub'], getTeamDatasetValidSub);
const datasetUsageMap = useMemo(() => {
- const rate = datasetSub.usedSize / datasetSub.maxSize;
+ const rate = teamSubPlan.usedDatasetSize / teamSubPlan.datasetMaxSize;
const colorScheme = (() => {
if (rate < 0.5) return 'green';
@@ -138,10 +138,10 @@ const UserInfo = () => {
return {
colorScheme,
value: rate * 100,
- maxSize: datasetSub.maxSize,
- usedSize: datasetSub.usedSize
+ maxSize: teamSubPlan.datasetMaxSize || t('common.Unlimited'),
+ usedSize: teamSubPlan.usedDatasetSize
};
- }, [datasetSub.maxSize, datasetSub.usedSize]);
+ }, [teamSubPlan.usedDatasetSize, teamSubPlan.datasetMaxSize, t]);
return (
{
{t('support.user.team.Dataset usage')}: {datasetUsageMap.usedSize}/
- {datasetSub.maxSize}
+ {datasetUsageMap.maxSize}
{userInfo?.team?.canWrite && (
|
-
+ }
+ }
+ ]}
+ />
|
))}
@@ -249,6 +247,7 @@ function EditLinkModal({
onCreate: (id: string) => void;
onEdit: () => void;
}) {
+ const { feConfigs } = useSystemStore();
const { t } = useTranslation();
const {
register,
diff --git a/projects/app/src/pages/app/detail/components/OutLink/index.tsx b/projects/app/src/pages/app/detail/components/OutLink/index.tsx
index 154a7c4b150..dbad20d9386 100644
--- a/projects/app/src/pages/app/detail/components/OutLink/index.tsx
+++ b/projects/app/src/pages/app/detail/components/OutLink/index.tsx
@@ -18,7 +18,7 @@ const OutLink = ({ appId }: { appId: string }) => {
return (