This commit is contained in:
Archer
2023-12-18 16:24:50 +08:00
committed by GitHub
parent d33c99f564
commit 703583fff7
130 changed files with 3418 additions and 2579 deletions

View File

@@ -3,8 +3,7 @@ import MyModal from '@/components/MyModal';
import { useQuery } from '@tanstack/react-query';
import React, { Dispatch, useMemo, useState } from 'react';
import { useTranslation } from 'next-i18next';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import { Box, Flex } from '@chakra-ui/react';
import { Box } from '@chakra-ui/react';
import ParentPaths from '@/components/common/ParentPaths';
type PathItemType = {
@@ -53,13 +52,12 @@ const DatasetSelectContainer = ({
}
isOpen={isOpen}
onClose={onClose}
h={'80vh'}
w={'100%'}
maxW={['90vw', '900px']}
isCentered
>
<Flex flexDirection={'column'} h={'90vh'}>
<Box flex={'1 0 0'}>{children}</Box>
</Flex>
{children}
</MyModal>
);
};

View File

@@ -66,7 +66,7 @@ const AIChatSettingsModal = ({
fontSize: ['sm', 'md']
};
const selectTemplateBtn: BoxProps = {
color: 'myBlue.600',
color: 'blue.500',
cursor: 'pointer'
};

View File

@@ -82,7 +82,7 @@ export const DatasetSelectModal = ({
p={3}
border={theme.borders.base}
boxShadow={'sm'}
bg={'myBlue.300'}
bg={'blue.200'}
>
<Flex alignItems={'center'} h={'38px'}>
<Avatar src={item.avatar} w={['24px', '28px']}></Avatar>

View File

@@ -12,10 +12,7 @@ import type {
FlowModuleItemType,
FlowModuleTemplateType
} from '@fastgpt/global/core/module/type.d';
import type {
FlowNodeOutputTargetItemType,
FlowNodeChangeProps
} from '@fastgpt/global/core/module/node/type';
import type { FlowNodeChangeProps } from '@fastgpt/global/core/module/node/type';
import React, {
type SetStateAction,
type Dispatch,

View File

@@ -60,7 +60,7 @@ const SelectAppModal = ({
cursor={'pointer'}
{...(selectedApps.includes(app._id)
? {
bg: 'myBlue.200',
bg: 'blue.100',
onClick: () => {
setSelectedApps(selectedApps.filter((e) => e !== app._id));
}

View File

@@ -36,7 +36,7 @@ const ButtonEdge = (
targetPosition
});
const edgeStyle = {
const edgeStyle: React.CSSProperties = {
...style,
...(selected
? {
@@ -63,6 +63,7 @@ const ButtonEdge = (
color={'black'}
cursor={'pointer'}
border={'1px solid #fff'}
zIndex={selected ? 1000 : 0}
_hover={{
boxShadow: '0 0 6px 2px rgba(0, 0, 0, 0.08)'
}}
@@ -71,7 +72,7 @@ const ButtonEdge = (
<MyIcon
name="closeSolid"
w={'100%'}
color={selected ? 'myBlue.800' : 'myGray.500'}
color={selected ? 'blue.700' : 'myGray.500'}
></MyIcon>
</Flex>
</EdgeLabelRenderer>

View File

@@ -65,7 +65,7 @@ const NodePluginInput = ({ data }: NodeProps<FlowModuleItemType>) => {
w={'14px'}
cursor={'pointer'}
mr={3}
_hover={{ color: 'myBlue.600' }}
_hover={{ color: 'blue.500' }}
onClick={() =>
setEditField({
inputType: item.type,

View File

@@ -84,7 +84,7 @@ const NodePluginOutput = ({ data }: NodeProps<FlowModuleItemType>) => {
w={'14px'}
cursor={'pointer'}
ml={3}
_hover={{ color: 'myBlue.600' }}
_hover={{ color: 'blue.500' }}
onClick={() =>
setEditField({
inputType: item.type,

View File

@@ -1,6 +1,6 @@
import { EditNodeFieldType, FlowNodeInputItemType } from '@fastgpt/global/core/module/node/type';
import React, { useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useTranslation } from 'next-i18next';
import {
onChangeNode,
useFlowProviderStore,
@@ -81,7 +81,7 @@ const InputLabel = ({
w={'14px'}
cursor={'pointer'}
ml={3}
_hover={{ color: 'myBlue.600' }}
_hover={{ color: 'blue.500' }}
onClick={() =>
setEditField({
inputType: type,

View File

@@ -41,7 +41,7 @@ const OutputLabel = ({
w={'14px'}
cursor={'pointer'}
mr={3}
_hover={{ color: 'myBlue.600' }}
_hover={{ color: 'blue.500' }}
onClick={() =>
setEditField({
key: outputKey,

View File

@@ -96,8 +96,10 @@ const Container = React.memo(function Container(props: Props) {
minZoom={0.1}
maxZoom={1.5}
defaultEdgeOptions={{
animated: true
animated: true,
zIndex: 0
}}
elevateEdgesOnSelect
connectionLineStyle={{ strokeWidth: 2, stroke: '#5A646Es' }}
nodeTypes={nodeTypes}
edgeTypes={edgeTypes}