mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 09:44:47 +00:00
feat: plan index;flat i18n and add variable value type (#2762)
* feat: plan index * flat i18n and add variable value type * fix: ts * perf: free plan tip
This commit is contained in:
@@ -451,13 +451,12 @@ const PlanUsage = () => {
|
||||
</Button>
|
||||
</Flex>
|
||||
<Box px={[5, 7]} pb={[3, 6]}>
|
||||
{isFreeTeam ? (
|
||||
<>
|
||||
<Box mt="2" color={'#485264'} fontSize="sm">
|
||||
{t('common:info.free_plan')}
|
||||
</Box>
|
||||
</>
|
||||
) : (
|
||||
{isFreeTeam && (
|
||||
<Box mt="2" color={'#485264'} fontSize="sm">
|
||||
{t('common:info.free_plan')}
|
||||
</Box>
|
||||
)}
|
||||
{standardPlan.currentSubLevel !== StandardSubLevelEnum.free && (
|
||||
<Flex mt="2" color={'#485264'} fontSize="xs">
|
||||
<Box>{t('common:support.wallet.Plan expired time')}:</Box>
|
||||
<Box ml={2}>{formatTime2YMD(standardPlan?.expiredTime)}</Box>
|
||||
|
@@ -10,7 +10,7 @@ import { Background, NodeProps } from 'reactflow';
|
||||
import NodeCard from '../render/NodeCard';
|
||||
import Container from '../../components/Container';
|
||||
import IOTitle from '../../components/IOTitle';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import RenderInput from '../render/RenderInput';
|
||||
import { Box } from '@chakra-ui/react';
|
||||
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
|
@@ -12,7 +12,7 @@ import {
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
import { WorkflowContext } from '../../../context';
|
||||
import { AppContext } from '../../../../context';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { getGlobalVariableNode } from '@/web/core/workflow/adapt';
|
||||
|
||||
const typeMap = {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { FlowNodeItemType } from '@fastgpt/global/core/workflow/type/node';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { NodeProps } from 'reactflow';
|
||||
import NodeCard from '../render/NodeCard';
|
||||
import EmptyTip from '@fastgpt/web/components/common/EmptyTip';
|
||||
|
@@ -409,7 +409,7 @@ const FieldEditModal = ({
|
||||
{/* value type */}
|
||||
<Flex alignItems={'center'}>
|
||||
<FormLabel flex={'0 0 100px'} fontWeight={'medium'}>
|
||||
{t('common:core.module.Data Type')}
|
||||
{t('workflow:value_type')}
|
||||
</FormLabel>
|
||||
{showValueTypeSelect ? (
|
||||
<Box flex={1}>
|
||||
|
@@ -43,7 +43,6 @@ import LightRowTabs from '@fastgpt/web/components/common/Tabs/LightRowTabs';
|
||||
import { useSystem } from '@fastgpt/web/hooks/useSystem';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import TemplateMarketModal from './components/TemplateMarketModal';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
|
||||
const CreateModal = dynamic(() => import('./components/CreateModal'));
|
||||
const EditFolderModal = dynamic(
|
||||
@@ -71,7 +70,6 @@ const MyApps = () => {
|
||||
setSearchKey
|
||||
} = useContextSelector(AppListContext, (v) => v);
|
||||
const { userInfo } = useUserStore();
|
||||
const { setAppType } = useSystemStore();
|
||||
|
||||
const [createAppType, setCreateAppType] = useState<CreateAppType>();
|
||||
const {
|
||||
@@ -173,13 +171,12 @@ const MyApps = () => {
|
||||
fontSize={['sm', 'md']}
|
||||
flexShrink={0}
|
||||
onChange={(e) => {
|
||||
setAppType(e);
|
||||
// router.push({
|
||||
// query: {
|
||||
// ...router.query,
|
||||
// type: e
|
||||
// }
|
||||
// });
|
||||
router.push({
|
||||
query: {
|
||||
...router.query,
|
||||
type: e
|
||||
}
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<Box flex={1} />
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { Box, Flex, Button, IconButton, Input, Textarea, HStack } from '@chakra-ui/react';
|
||||
import { DeleteIcon } from '@chakra-ui/icons';
|
||||
import React, { useMemo } from 'react';
|
||||
import { Box, Flex, Button } from '@chakra-ui/react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { getDatasetCollectionById } from '@/web/core/dataset/api';
|
||||
@@ -33,7 +32,7 @@ const MetaDataCard = ({ datasetId }: { datasetId: string }) => {
|
||||
manual: false
|
||||
}
|
||||
);
|
||||
const metadataList = useMemo(() => {
|
||||
const metadataList = useMemo<{ label?: string; value?: any }[]>(() => {
|
||||
if (!collection) return [];
|
||||
|
||||
const webSelector =
|
||||
|
Reference in New Issue
Block a user