From 7a929db0a5471d0ad2867ae55c6222d9c32ca993 Mon Sep 17 00:00:00 2001 From: heheer Date: Mon, 4 Nov 2024 10:32:38 +0800 Subject: [PATCH] chore(ui): login page & workflow page (#3046) * login page & number input & multirow select & llm select * workflow * adjust nodes --- .../web/components/common/Icon/constants.ts | 15 +- .../components/common/Icon/icons/check.svg | 3 + .../Icon/icons/common/editor/resizer.svg | 5 +- .../common/Icon/icons/common/importLight.svg | 8 +- .../Icon/icons/common/questionLight.svg | 4 - .../common/Icon/icons/common/select.svg | 5 +- .../components/common/Icon/icons/edgeAdd.svg | 3 + .../web/components/common/Icon/icons/help.svg | 3 + .../icons/support/account/passwordLogin.svg | 6 - .../common/Input/NumberInput/index.tsx | 36 ++- .../web/components/common/MyBox/FormLabel.tsx | 9 +- .../web/components/common/MyMenu/index.tsx | 1 - .../common/MySelect/MultipleRowSelect.tsx | 20 +- .../web/components/common/MySelect/index.tsx | 18 +- .../common/MyTooltip/QuestionTip.tsx | 5 +- .../components/common/Tabs/LightRowTabs.tsx | 2 +- .../common/Textarea/PromptEditor/Editor.tsx | 10 +- .../Textarea/PromptEditor/index.module.scss | 39 ++++ .../common/Textarea/PromptEditor/index.tsx | 2 +- .../core/workflow/NodeInputSelect.tsx | 16 +- packages/web/i18n/en/app.json | 5 +- packages/web/i18n/zh/app.json | 5 +- packages/web/styles/theme.ts | 66 ++++-- projects/app/public/icon/logo.svg | 35 ++- projects/app/public/icon/resizer.svg | 4 + .../core/ai/SettingLLMModel/index.tsx | 9 +- .../src/components/core/app/FileSelect.tsx | 5 +- .../components/core/app/InputGuideConfig.tsx | 3 +- .../app/src/components/core/app/QGSwitch.tsx | 2 +- .../core/app/ScheduledTriggerConfig.tsx | 3 +- .../app/src/components/core/app/TTSSelect.tsx | 3 +- .../src/components/core/app/VariableEdit.tsx | 123 ++++++---- .../components/core/app/WelcomeTextConfig.tsx | 9 +- .../src/components/core/app/WhisperConfig.tsx | 3 +- .../core/chat/components/AIResponseBox.tsx | 21 +- .../permission/DefaultPerList/index.tsx | 1 + .../app/detail/components/Plugin/Header.tsx | 21 +- .../pages/app/detail/components/RouteTab.tsx | 4 +- .../detail/components/SimpleApp/AppCard.tsx | 4 +- .../app/detail/components/Workflow/Header.tsx | 21 +- .../components/WorkflowComponents/AppCard.tsx | 215 ++++++++++-------- .../Flow/components/ButtonEdge.tsx | 4 +- .../Flow/components/Container.tsx | 6 +- .../Flow/components/IOTitle.tsx | 2 +- .../Flow/hooks/useWorkflow.tsx | 2 +- .../Flow/nodes/Loop/NodeLoopEnd.tsx | 2 +- .../Flow/nodes/Loop/NodeLoopStart.tsx | 2 +- .../Flow/nodes/NodeCQNode.tsx | 2 +- .../Flow/nodes/NodeExtract/index.tsx | 13 +- .../nodes/NodePluginIO/InputTypeConfig.tsx | 8 +- .../Flow/nodes/NodePluginIO/PluginInput.tsx | 3 +- .../Flow/nodes/NodeSimple.tsx | 2 +- .../Flow/nodes/NodeSystemConfig.tsx | 21 +- .../Flow/nodes/NodeTools.tsx | 2 +- .../Flow/nodes/NodeWorkflowStart.tsx | 2 +- .../Flow/nodes/render/Handle/index.tsx | 5 +- .../Flow/nodes/render/Handle/style.tsx | 2 +- .../Flow/nodes/render/NodeCard.tsx | 90 ++++---- .../RenderInput/templates/NumberInput.tsx | 32 ++- .../RenderInput/templates/Reference.tsx | 4 +- .../templates/SettingQuotePrompt.tsx | 6 +- .../Flow/nodes/render/RenderOutput/index.tsx | 2 +- .../Import/commonProgress/DataProcess.tsx | 53 ++--- .../login/components/ForgetPasswordForm.tsx | 22 +- .../login/components/LoginForm/LoginForm.tsx | 39 +++- .../login/components/LoginForm/WechatForm.tsx | 3 +- .../LoginForm/components/FormLayout.tsx | 41 ++-- .../pages/login/components/RegisterForm.tsx | 18 +- projects/app/src/pages/login/index.tsx | 14 +- .../src/pages/price/components/ExtraPlan.tsx | 93 ++------ .../web/support/user/hooks/useSendCode.tsx | 3 +- 71 files changed, 745 insertions(+), 525 deletions(-) create mode 100644 packages/web/components/common/Icon/icons/check.svg delete mode 100644 packages/web/components/common/Icon/icons/common/questionLight.svg create mode 100644 packages/web/components/common/Icon/icons/edgeAdd.svg create mode 100644 packages/web/components/common/Icon/icons/help.svg delete mode 100644 packages/web/components/common/Icon/icons/support/account/passwordLogin.svg create mode 100644 projects/app/public/icon/resizer.svg diff --git a/packages/web/components/common/Icon/constants.ts b/packages/web/components/common/Icon/constants.ts index 512311766..5a26825ee 100644 --- a/packages/web/components/common/Icon/constants.ts +++ b/packages/web/components/common/Icon/constants.ts @@ -4,6 +4,7 @@ export const iconPaths = { book: () => import('./icons/book.svg'), change: () => import('./icons/change.svg'), chatSend: () => import('./icons/chatSend.svg'), + check: () => import('./icons/check.svg'), closeSolid: () => import('./icons/closeSolid.svg'), collectionLight: () => import('./icons/collectionLight.svg'), collectionSolid: () => import('./icons/collectionSolid.svg'), @@ -59,7 +60,6 @@ export const iconPaths = { 'common/playFill': () => import('./icons/common/playFill.svg'), 'common/playLight': () => import('./icons/common/playLight.svg'), 'common/publishFill': () => import('./icons/common/publishFill.svg'), - 'common/questionLight': () => import('./icons/common/questionLight.svg'), 'common/refreshLight': () => import('./icons/common/refreshLight.svg'), 'common/resultLight': () => import('./icons/common/resultLight.svg'), 'common/retryLight': () => import('./icons/common/retryLight.svg'), @@ -217,6 +217,7 @@ export const iconPaths = { 'core/workflow/template/FileRead': () => import('./icons/core/workflow/template/FileRead.svg'), 'core/workflow/template/aiChat': () => import('./icons/core/workflow/template/aiChat.svg'), 'core/workflow/template/baseChart': () => import('./icons/core/workflow/template/baseChart.svg'), + 'core/workflow/template/bing': () => import('./icons/core/workflow/template/bing.svg'), 'core/workflow/template/codeRun': () => import('./icons/core/workflow/template/codeRun.svg'), 'core/workflow/template/customFeedback': () => import('./icons/core/workflow/template/customFeedback.svg'), @@ -224,18 +225,16 @@ export const iconPaths = { import('./icons/core/workflow/template/datasetConcat.svg'), 'core/workflow/template/datasetSearch': () => import('./icons/core/workflow/template/datasetSearch.svg'), + 'core/workflow/template/datasource': () => + import('./icons/core/workflow/template/datasource.svg'), 'core/workflow/template/duckduckgo': () => import('./icons/core/workflow/template/duckduckgo.svg'), 'core/workflow/template/extractJson': () => import('./icons/core/workflow/template/extractJson.svg'), - 'core/workflow/template/wiki': () => import('./icons/core/workflow/template/wiki.svg'), - 'core/workflow/template/datasource': () => - import('./icons/core/workflow/template/datasource.svg'), - 'core/workflow/template/google': () => import('./icons/core/workflow/template/google.svg'), - 'core/workflow/template/bing': () => import('./icons/core/workflow/template/bing.svg'), 'core/workflow/template/fetchUrl': () => import('./icons/core/workflow/template/fetchUrl.svg'), 'core/workflow/template/formInput': () => import('./icons/core/workflow/template/formInput.svg'), 'core/workflow/template/getTime': () => import('./icons/core/workflow/template/getTime.svg'), + 'core/workflow/template/google': () => import('./icons/core/workflow/template/google.svg'), 'core/workflow/template/httpRequest': () => import('./icons/core/workflow/template/httpRequest.svg'), 'core/workflow/template/ifelse': () => import('./icons/core/workflow/template/ifelse.svg'), @@ -271,6 +270,7 @@ export const iconPaths = { 'core/workflow/template/variable': () => import('./icons/core/workflow/template/variable.svg'), 'core/workflow/template/variableUpdate': () => import('./icons/core/workflow/template/variableUpdate.svg'), + 'core/workflow/template/wiki': () => import('./icons/core/workflow/template/wiki.svg'), 'core/workflow/template/workflowStart': () => import('./icons/core/workflow/template/workflowStart.svg'), 'core/workflow/touchTable': () => import('./icons/core/workflow/touchTable.svg'), @@ -280,6 +280,7 @@ export const iconPaths = { date: () => import('./icons/date.svg'), delete: () => import('./icons/delete.svg'), drag: () => import('./icons/drag.svg'), + edgeAdd: () => import('./icons/edgeAdd.svg'), edit: () => import('./icons/edit.svg'), empty: () => import('./icons/empty.svg'), export: () => import('./icons/export.svg'), @@ -302,6 +303,7 @@ export const iconPaths = { 'file/pdf': () => import('./icons/file/pdf.svg'), 'file/qaImport': () => import('./icons/file/qaImport.svg'), 'file/uploadFile': () => import('./icons/file/uploadFile.svg'), + help: () => import('./icons/help.svg'), history: () => import('./icons/history.svg'), infoRounded: () => import('./icons/infoRounded.svg'), kbTest: () => import('./icons/kbTest.svg'), @@ -331,7 +333,6 @@ export const iconPaths = { save: () => import('./icons/save.svg'), stop: () => import('./icons/stop.svg'), 'support/account/loginoutLight': () => import('./icons/support/account/loginoutLight.svg'), - 'support/account/passwordLogin': () => import('./icons/support/account/passwordLogin.svg'), 'support/account/plans': () => import('./icons/support/account/plans.svg'), 'support/account/promotionLight': () => import('./icons/support/account/promotionLight.svg'), 'support/bill/extraDatasetsize': () => import('./icons/support/bill/extraDatasetsize.svg'), diff --git a/packages/web/components/common/Icon/icons/check.svg b/packages/web/components/common/Icon/icons/check.svg new file mode 100644 index 000000000..5332e6086 --- /dev/null +++ b/packages/web/components/common/Icon/icons/check.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/packages/web/components/common/Icon/icons/common/editor/resizer.svg b/packages/web/components/common/Icon/icons/common/editor/resizer.svg index b7e276b17..53bdea172 100644 --- a/packages/web/components/common/Icon/icons/common/editor/resizer.svg +++ b/packages/web/components/common/Icon/icons/common/editor/resizer.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + \ No newline at end of file diff --git a/packages/web/components/common/Icon/icons/common/importLight.svg b/packages/web/components/common/Icon/icons/common/importLight.svg index b83f8efdd..4eadad39b 100644 --- a/packages/web/components/common/Icon/icons/common/importLight.svg +++ b/packages/web/components/common/Icon/icons/common/importLight.svg @@ -1,6 +1,4 @@ - - - + + + \ No newline at end of file diff --git a/packages/web/components/common/Icon/icons/common/questionLight.svg b/packages/web/components/common/Icon/icons/common/questionLight.svg deleted file mode 100644 index f09e09270..000000000 --- a/packages/web/components/common/Icon/icons/common/questionLight.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/web/components/common/Icon/icons/common/select.svg b/packages/web/components/common/Icon/icons/common/select.svg index 8081fb521..22e274fb0 100644 --- a/packages/web/components/common/Icon/icons/common/select.svg +++ b/packages/web/components/common/Icon/icons/common/select.svg @@ -1,4 +1,3 @@ - - + + \ No newline at end of file diff --git a/packages/web/components/common/Icon/icons/edgeAdd.svg b/packages/web/components/common/Icon/icons/edgeAdd.svg new file mode 100644 index 000000000..cade27beb --- /dev/null +++ b/packages/web/components/common/Icon/icons/edgeAdd.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/web/components/common/Icon/icons/help.svg b/packages/web/components/common/Icon/icons/help.svg new file mode 100644 index 000000000..9da1bbd44 --- /dev/null +++ b/packages/web/components/common/Icon/icons/help.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/packages/web/components/common/Icon/icons/support/account/passwordLogin.svg b/packages/web/components/common/Icon/icons/support/account/passwordLogin.svg deleted file mode 100644 index 492c5c8b1..000000000 --- a/packages/web/components/common/Icon/icons/support/account/passwordLogin.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/web/components/common/Input/NumberInput/index.tsx b/packages/web/components/common/Input/NumberInput/index.tsx index 8d8587240..58b788ebf 100644 --- a/packages/web/components/common/Input/NumberInput/index.tsx +++ b/packages/web/components/common/Input/NumberInput/index.tsx @@ -7,28 +7,50 @@ import { NumberInputProps } from '@chakra-ui/react'; import React from 'react'; +import MyIcon from '../../Icon'; +import { UseFormRegister } from 'react-hook-form'; type Props = Omit & { - onChange: (e?: number) => any; + onChange?: (e?: number) => any; placeholder?: string; + register?: UseFormRegister; + name?: string; + bg?: string; }; const MyNumberInput = (props: Props) => { + const { register, name, onChange, placeholder, bg, ...restProps } = props; + return ( { + if (!onChange) return; if (isNaN(Number(e))) { - props?.onChange(); + onChange(); } else { - props?.onChange(Number(e)); + onChange(Number(e)); } }} > - + - - + + + + + + ); diff --git a/packages/web/components/common/MyBox/FormLabel.tsx b/packages/web/components/common/MyBox/FormLabel.tsx index 60dba93ff..52a121f0e 100644 --- a/packages/web/components/common/MyBox/FormLabel.tsx +++ b/packages/web/components/common/MyBox/FormLabel.tsx @@ -10,7 +10,14 @@ const FormLabel = ({ children: React.ReactNode; }) => { return ( - + {required && ( * diff --git a/packages/web/components/common/MyMenu/index.tsx b/packages/web/components/common/MyMenu/index.tsx index 98d1442ce..f62630f15 100644 --- a/packages/web/components/common/MyMenu/index.tsx +++ b/packages/web/components/common/MyMenu/index.tsx @@ -148,7 +148,6 @@ const MyMenu = ({ color={isOpen ? 'primary.600' : ''} w="fit-content" p="1" - bgColor={isOpen ? 'myGray.50' : ''} h="fit-content" borderRadius="sm" > diff --git a/packages/web/components/common/MySelect/MultipleRowSelect.tsx b/packages/web/components/common/MySelect/MultipleRowSelect.tsx index 73f630bf0..68b8d0373 100644 --- a/packages/web/components/common/MySelect/MultipleRowSelect.tsx +++ b/packages/web/components/common/MySelect/MultipleRowSelect.tsx @@ -1,9 +1,9 @@ import React, { useRef, useCallback, useState } from 'react'; import { Button, useDisclosure, Box, Flex, useOutsideClick } from '@chakra-ui/react'; -import { ChevronDownIcon } from '@chakra-ui/icons'; import { MultipleSelectProps } from './type'; import EmptyTip from '../EmptyTip'; import { useTranslation } from 'next-i18next'; +import MyIcon from '../../common/Icon'; const MultipleRowSelect = ({ placeholder, @@ -106,17 +106,25 @@ const MultipleRowSelect = ({ } - variant={'whiteBase'} + variant={'whitePrimaryOutline'} + size={'lg'} + fontSize={'sm'} + px={3} + outline={'none'} + rightIcon={} _active={{ transform: 'none' }} {...(isOpen ? { - boxShadow: '0px 0px 4px #A8DBFF', - borderColor: 'primary.500' + borderColor: 'primary.600', + color: 'primary.700', + boxShadow: '0px 0px 0px 2.4px rgba(51, 112, 255, 0.15)' } - : {})} + : { + borderColor: 'myGray.200', + boxShadow: 'none' + })} {...styles} onClick={() => (isOpen ? onClose() : onOpenSelect())} > diff --git a/packages/web/components/common/MySelect/index.tsx b/packages/web/components/common/MySelect/index.tsx index 029da2e8a..bbb9890ad 100644 --- a/packages/web/components/common/MySelect/index.tsx +++ b/packages/web/components/common/MySelect/index.tsx @@ -59,10 +59,11 @@ const MySelect = ( display: 'flex', alignItems: 'center', _hover: { - backgroundColor: 'myWhite.600' + backgroundColor: 'myGray.100', + color: 'primary.700' }, _notLast: { - mb: 2 + mb: 1 } }; const { isOpen, onOpen, onClose } = useDisclosure(); @@ -107,16 +108,19 @@ const MySelect = ( ref={ButtonRef} width={width} px={3} - rightIcon={} - variant={'whitePrimary'} + rightIcon={} + variant={'whitePrimaryOutline'} + size={'lg'} + fontSize={'sm'} textAlign={'left'} _active={{ transform: 'none' }} {...(isOpen ? { - boxShadow: '0px 0px 4px #A8DBFF', - borderColor: 'primary.500' + boxShadow: '0px 0px 0px 2.4px rgba(51, 112, 255, 0.15)', + borderColor: 'primary.600', + color: 'primary.700' } : {})} {...props} @@ -157,7 +161,7 @@ const MySelect = ( {...(value === item.value ? { ref: SelectedItemRef, - color: 'primary.600', + color: 'primary.700', bg: 'myGray.100' } : { diff --git a/packages/web/components/common/MyTooltip/QuestionTip.tsx b/packages/web/components/common/MyTooltip/QuestionTip.tsx index 57a449165..506d22c64 100644 --- a/packages/web/components/common/MyTooltip/QuestionTip.tsx +++ b/packages/web/components/common/MyTooltip/QuestionTip.tsx @@ -1,6 +1,7 @@ import React from 'react'; import MyTooltip from '.'; -import { IconProps, QuestionOutlineIcon } from '@chakra-ui/icons'; +import { IconProps } from '@chakra-ui/icons'; +import MyIcon from '../Icon'; type Props = IconProps & { label?: string | React.ReactNode; @@ -9,7 +10,7 @@ type Props = IconProps & { const QuestionTip = ({ label, maxW, ...props }: Props) => { return ( - + ); }; diff --git a/packages/web/components/common/Tabs/LightRowTabs.tsx b/packages/web/components/common/Tabs/LightRowTabs.tsx index ab743c1c7..9b517a1c6 100644 --- a/packages/web/components/common/Tabs/LightRowTabs.tsx +++ b/packages/web/components/common/Tabs/LightRowTabs.tsx @@ -72,11 +72,11 @@ const LightRowTabs = ({ _hover={{ color: activeColor }} + fontWeight={'medium'} {...(value === item.value ? { color: activeColor, cursor: 'default', - fontWeight: 'bold', borderBottomColor: activeColor } : { diff --git a/packages/web/components/common/Textarea/PromptEditor/Editor.tsx b/packages/web/components/common/Textarea/PromptEditor/Editor.tsx index 4fdb78351..ce85e7d65 100644 --- a/packages/web/components/common/Textarea/PromptEditor/Editor.tsx +++ b/packages/web/components/common/Textarea/PromptEditor/Editor.tsx @@ -105,10 +105,10 @@ export default function Editor({ left={0} right={0} bottom={0} - py={3} - px={4} + py={2} + px={3} pointerEvents={'none'} - overflow={'overlay'} + overflow={'hidden'} > - + )} diff --git a/packages/web/components/common/Textarea/PromptEditor/index.module.scss b/packages/web/components/common/Textarea/PromptEditor/index.module.scss index de7297616..a161224d6 100644 --- a/packages/web/components/common/Textarea/PromptEditor/index.module.scss +++ b/packages/web/components/common/Textarea/PromptEditor/index.module.scss @@ -9,6 +9,45 @@ font-size: var(--chakra-fontSizes-sm); overflow-y: auto; + + &:hover { + border-color: var(--chakra-colors-primary-300); + } + &::-webkit-scrollbar { + color: var(--chakra-colors-myGray-100); + } + &::-webkit-scrollbar-thumb { + background-color: var(--chakra-colors-myGray-200) !important; + cursor: pointer; + } + &::-webkit-scrollbar-thumb:hover { + background-color: var(--chakra-colors-myGray-250) !important; + } +} + +.contentEditable_isFlow { + position: relative; + height: 100%; + width: 100%; + border: 1px solid var(--chakra-colors-myGray-200); + border-radius: var(--chakra-radii-sm); + padding: 6px 8px; + font-size: var(--chakra-fontSizes-sm); + overflow-y: auto; + + &:hover { + border-color: var(--chakra-colors-primary-300); + } + &::-webkit-scrollbar { + color: var(--chakra-colors-myGray-100); + } + &::-webkit-scrollbar-thumb { + background-color: var(--chakra-colors-myGray-200) !important; + cursor: pointer; + } + &::-webkit-scrollbar-thumb:hover { + background-color: var(--chakra-colors-myGray-250) !important; + } } .contentEditable:focus { diff --git a/packages/web/components/common/Textarea/PromptEditor/index.tsx b/packages/web/components/common/Textarea/PromptEditor/index.tsx index 1977942c4..cf8d0cb2f 100644 --- a/packages/web/components/common/Textarea/PromptEditor/index.tsx +++ b/packages/web/components/common/Textarea/PromptEditor/index.tsx @@ -1,4 +1,4 @@ -import { Box, Button, ModalBody, ModalFooter, useDisclosure } from '@chakra-ui/react'; +import { Button, ModalBody, ModalFooter, useDisclosure } from '@chakra-ui/react'; import React from 'react'; import { editorStateToText } from './utils'; import Editor from './Editor'; diff --git a/packages/web/components/core/workflow/NodeInputSelect.tsx b/packages/web/components/core/workflow/NodeInputSelect.tsx index 044754a67..ca170e8f5 100644 --- a/packages/web/components/core/workflow/NodeInputSelect.tsx +++ b/packages/web/components/core/workflow/NodeInputSelect.tsx @@ -150,12 +150,20 @@ const NodeInputSelect = ({ trigger="click" Button={ } - rightIcon={} + leftIcon={ + + } + rightIcon={} variant={'grayBase'} border={theme.borders.base} - borderRadius={'xs'} + borderColor={'myGray.200'} + borderRadius={'sm'} + px={'10px'} + py={'6px'} + fontSize={'mini'} + color={'myGray.600'} + h={'28px'} + bg={'myGray.100'} > {renderTypeData.title} diff --git a/packages/web/i18n/en/app.json b/packages/web/i18n/en/app.json index e93f967de..a72e84fa0 100644 --- a/packages/web/i18n/en/app.json +++ b/packages/web/i18n/en/app.json @@ -1,5 +1,8 @@ { + "Role_setting": "Role setting", "Run": "Execute", + "Team Tags Set": "Team tags", + "Team_Tags": "Team tags", "ai_settings": "AI Configuration", "all_apps": "All Applications", "app.Version name": "Version Name", @@ -159,4 +162,4 @@ "workflow.user_file_input_desc": "Links to documents and images uploaded by users.", "workflow.user_select": "User Selection", "workflow.user_select_tip": "This module can configure multiple options for selection during the dialogue. Different options can lead to different workflow branches." -} \ No newline at end of file +} diff --git a/packages/web/i18n/zh/app.json b/packages/web/i18n/zh/app.json index 9b8fda251..1e1e52100 100644 --- a/packages/web/i18n/zh/app.json +++ b/packages/web/i18n/zh/app.json @@ -1,5 +1,8 @@ { + "Role_setting": "权限设置", "Run": "运行", + "Team Tags Set": "团队标签", + "Team_Tags": "团队标签", "ai_settings": "AI 配置", "all_apps": "全部应用", "app.Version name": "版本名称", @@ -160,4 +163,4 @@ "workflow.user_file_input_desc": "用户上传的文档和图片链接", "workflow.user_select": "用户选择", "workflow.user_select_tip": "该模块可配置多个选项,以供对话时选择。不同选项可导向不同工作流支线" -} \ No newline at end of file +} diff --git a/packages/web/styles/theme.ts b/packages/web/styles/theme.ts index 1f5b49227..ff105e192 100644 --- a/packages/web/styles/theme.ts +++ b/packages/web/styles/theme.ts @@ -46,7 +46,7 @@ const Button = defineStyleConfig({ px: '2', py: '0', h: '24px', - fontWeight: 'normal', + fontWeight: 'medium', borderRadius: 'sm' }, xsSquare: { @@ -55,14 +55,14 @@ const Button = defineStyleConfig({ py: '0', h: '24px', w: '24px', - fontWeight: 'normal', + fontWeight: 'medium', borderRadius: 'sm' }, sm: { fontSize: 'sm', px: '3', py: 0, - fontWeight: 'normal', + fontWeight: 'medium', h: '30px', borderRadius: 'sm' }, @@ -70,7 +70,7 @@ const Button = defineStyleConfig({ fontSize: 'sm', px: '0', py: 0, - fontWeight: 'normal', + fontWeight: 'medium', h: '30px', w: '30px', borderRadius: 'sm' @@ -80,8 +80,8 @@ const Button = defineStyleConfig({ px: '4', py: 0, h: '34px', - fontWeight: 'normal', - borderRadius: 'md' + fontWeight: 'medium', + borderRadius: 'sm' }, mdSquare: { fontSize: 'sm', @@ -89,16 +89,16 @@ const Button = defineStyleConfig({ py: 0, h: '34px', w: '34px', - fontWeight: 'normal', - borderRadius: 'md' + fontWeight: 'medium', + borderRadius: 'sm' }, lg: { fontSize: 'md', px: '4', py: 0, h: '40px', - fontWeight: 'normal', - borderRadius: 'lg' + fontWeight: 'medium', + borderRadius: 'md' }, lgSquare: { fontSize: 'md', @@ -106,8 +106,8 @@ const Button = defineStyleConfig({ py: 0, h: '40px', w: '40px', - fontWeight: 'normal', - borderRadius: 'lg' + fontWeight: 'medium', + borderRadius: 'md' } }, variants: { @@ -175,6 +175,16 @@ const Button = defineStyleConfig({ color: 'myGray.600 !important' } }, + whitePrimaryOutline: { + border: '1px solid', + borderColor: 'myGray.250', + bg: 'white', + transition: 'background 0.1s', + _hover: { + color: 'primary.600', + borderColor: 'primary.300' + } + }, whitePrimary: { color: 'myGray.600', border: '1px solid', @@ -288,12 +298,18 @@ const Input: ComponentStyleConfig = { sm: defineStyle({ field: { h: '32px', - borderRadius: 'md' + borderRadius: 'sm' } }), md: defineStyle({ field: { - h: '34px', + h: '36px', + borderRadius: 'sm' + } + }), + lg: defineStyle({ + field: { + h: '40px', borderRadius: 'md' } }) @@ -303,11 +319,15 @@ const Input: ComponentStyleConfig = { field: { border: '1px solid', borderColor: 'borderColor.low', + px: 3, _focus: { borderColor: 'primary.500', boxShadow: shadowLight, bg: 'white' }, + _hover: { + borderColor: 'primary.300' + }, _disabled: { color: 'myGray.400', bg: 'myWhite.300' @@ -330,7 +350,7 @@ const NumberInput = numInputMultiStyle({ fontsize: 'sm' } }), - md: defineStyle({ + lg: defineStyle({ field: { h: '40px', borderRadius: 'md', @@ -347,7 +367,7 @@ const NumberInput = numInputMultiStyle({ _focus: { borderColor: 'primary.500 !important', boxShadow: `${shadowLight} !important`, - bg: 'transparent' + bg: 'white' }, _disabled: { color: 'myGray.400 !important', @@ -356,10 +376,12 @@ const NumberInput = numInputMultiStyle({ }, stepper: { bg: 'transparent', - border: 'none', color: 'myGray.600', _active: { color: 'primary.500' + }, + _hover: { + bg: 'myGray.100' } } }) @@ -373,16 +395,24 @@ const Textarea: ComponentStyleConfig = { variants: { outline: { border: '1px solid', + px: 3, borderRadius: 'md', borderColor: 'myGray.200', fontSize: 'sm', _hover: { - borderColor: '' + borderColor: 'primary.300' }, _focus: { borderColor: 'primary.500', boxShadow: shadowLight, bg: 'white' + }, + '&::-webkit-resizer': { + background: "url('/icon/resizer.svg') no-repeat", + backgroundSize: '11px', + backgroundPosition: 'right bottom', + backgroundPositionX: 'right 12px', + backgroundPositionY: 'bottom 12px' } } }, diff --git a/projects/app/public/icon/logo.svg b/projects/app/public/icon/logo.svg index ec5a08663..8141202cd 100644 --- a/projects/app/public/icon/logo.svg +++ b/projects/app/public/icon/logo.svg @@ -1,12 +1,37 @@ - - - + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/app/public/icon/resizer.svg b/projects/app/public/icon/resizer.svg new file mode 100644 index 000000000..260d9451b --- /dev/null +++ b/projects/app/public/icon/resizer.svg @@ -0,0 +1,4 @@ + + + + diff --git a/projects/app/src/components/core/ai/SettingLLMModel/index.tsx b/projects/app/src/components/core/ai/SettingLLMModel/index.tsx index 88de9ec28..31f3ca8e4 100644 --- a/projects/app/src/components/core/ai/SettingLLMModel/index.tsx +++ b/projects/app/src/components/core/ai/SettingLLMModel/index.tsx @@ -68,7 +68,9 @@ const SettingLLMModel = ({ } - rightIcon={} - pl={4} + rightIcon={} + px={3} + pr={2} onClick={onOpenAIChatSetting} > diff --git a/projects/app/src/components/core/app/FileSelect.tsx b/projects/app/src/components/core/app/FileSelect.tsx index a4b8ac1d8..7f7361d9c 100644 --- a/projects/app/src/components/core/app/FileSelect.tsx +++ b/projects/app/src/components/core/app/FileSelect.tsx @@ -59,7 +59,9 @@ const FileSelect = ({ return ( - {t('app:file_upload')} + + {t('app:file_upload')} + @@ -68,6 +70,7 @@ const FileSelect = ({ iconSpacing={1} size={'sm'} mr={'-5px'} + color={'myGray.600'} onClick={onOpen} > {formLabel} diff --git a/projects/app/src/components/core/app/InputGuideConfig.tsx b/projects/app/src/components/core/app/InputGuideConfig.tsx index 8d9b7347d..67d725999 100644 --- a/projects/app/src/components/core/app/InputGuideConfig.tsx +++ b/projects/app/src/components/core/app/InputGuideConfig.tsx @@ -87,7 +87,7 @@ const InputGuideConfig = ({ - {chatT('input_guide')} + {chatT('input_guide')} @@ -97,6 +97,7 @@ const InputGuideConfig = ({ iconSpacing={1} size={'sm'} mr={'-5px'} + color={'myGray.600'} onClick={onOpen} > {formLabel} diff --git a/projects/app/src/components/core/app/QGSwitch.tsx b/projects/app/src/components/core/app/QGSwitch.tsx index ef2d1a71e..a54688010 100644 --- a/projects/app/src/components/core/app/QGSwitch.tsx +++ b/projects/app/src/components/core/app/QGSwitch.tsx @@ -11,7 +11,7 @@ const QGSwitch = (props: SwitchProps) => { return ( - {t('common:core.app.Question Guide')} + {t('common:core.app.Question Guide')} diff --git a/projects/app/src/components/core/app/ScheduledTriggerConfig.tsx b/projects/app/src/components/core/app/ScheduledTriggerConfig.tsx index ddef626ec..8072e7235 100644 --- a/projects/app/src/components/core/app/ScheduledTriggerConfig.tsx +++ b/projects/app/src/components/core/app/ScheduledTriggerConfig.tsx @@ -270,7 +270,7 @@ const ScheduledTriggerConfig = ({ - {t('common:core.app.Interval timer run')} + {t('common:core.app.Interval timer run')} @@ -279,6 +279,7 @@ const ScheduledTriggerConfig = ({ iconSpacing={1} size={'sm'} mr={'-5px'} + color={'myGray.600'} onClick={onOpen} > {formatLabel} diff --git a/projects/app/src/components/core/app/TTSSelect.tsx b/projects/app/src/components/core/app/TTSSelect.tsx index 7cb506c65..4cb5ae82f 100644 --- a/projects/app/src/components/core/app/TTSSelect.tsx +++ b/projects/app/src/components/core/app/TTSSelect.tsx @@ -82,7 +82,7 @@ const TTSSelect = ({ return ( - {t('common:core.app.TTS')} + {t('common:core.app.TTS')} @@ -92,6 +92,7 @@ const TTSSelect = ({ size={'sm'} mr={'-5px'} onClick={onOpen} + color={'myGray.600'} > {formLabel} diff --git a/projects/app/src/components/core/app/VariableEdit.tsx b/projects/app/src/components/core/app/VariableEdit.tsx index 58630d4ca..4745edf84 100644 --- a/projects/app/src/components/core/app/VariableEdit.tsx +++ b/projects/app/src/components/core/app/VariableEdit.tsx @@ -173,7 +173,9 @@ const VariableEdit = ({ {/* Row box */} - {t('common:core.module.Variable')} + + {t('common:core.module.Variable')} + } iconSpacing={1} size={'sm'} + color={'myGray.600'} mr={'-5px'} onClick={() => { reset(addVariable()); @@ -193,60 +196,96 @@ const VariableEdit = ({ {formatVariables.length > 0 && ( - - +
+ - - - + px={4} + fontWeight={'medium'} + > + {t('common:core.module.variable.key')} + + + + {formatVariables.map((item) => ( - - - - + + ))} diff --git a/projects/app/src/components/core/app/WelcomeTextConfig.tsx b/projects/app/src/components/core/app/WelcomeTextConfig.tsx index 1859948c3..67a3139ff 100644 --- a/projects/app/src/components/core/app/WelcomeTextConfig.tsx +++ b/projects/app/src/components/core/app/WelcomeTextConfig.tsx @@ -13,17 +13,20 @@ const WelcomeTextConfig = (props: TextareaProps) => { <> - {t('common:core.app.Welcome Text')} + + {t('common:core.app.Welcome Text')} + - {t('common:core.app.Whisper')} + {t('common:core.app.Whisper')}
- {t('workflow:Variable_name')}{t('app:global_variables_desc')}{t('common:common.Require Input')} + {t('workflow:Variable_name')} + + {t('common:common.Require Input')} + + {t('common:common.Operation')} +
- - {item.key} - {item.description || '-'} + + + {item.label} + {item.required ? '✔' : '-'} - { - const formattedItem = { - ...item, - list: item.enums || [] - }; - reset(formattedItem); - }} - /> - - onChange(variables.filter((variable) => variable.id !== item.id)) - } - /> + + {item.key} + + + {item.required ? ( + + ) : ( + '' + )} + + + + { + const formattedItem = { + ...item, + list: item.enums || [] + }; + reset(formattedItem); + }} + /> + + onChange(variables.filter((variable) => variable.id !== item.id)) + } + /> +
- - - - + + + + diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/InputTypeConfig.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/InputTypeConfig.tsx index 750706b79..14527c4e4 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/InputTypeConfig.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/InputTypeConfig.tsx @@ -24,7 +24,6 @@ import { FlowValueTypeMap } from '@fastgpt/global/core/workflow/node/constant'; import { FlowNodeInputItemType } from '@fastgpt/global/core/workflow/type/io'; -import MyNumberInput from '@fastgpt/web/components/common/Input/NumberInput'; import MySelect from '@fastgpt/web/components/common/MySelect'; import MultipleSelect from '@fastgpt/web/components/common/MySelect/MultipleSelect'; import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip'; @@ -35,6 +34,7 @@ import { useTranslation } from 'react-i18next'; import MyIcon from '@fastgpt/web/components/common/Icon'; import DndDrag, { Draggable } from '@fastgpt/web/components/common/DndDrag'; import MyTextarea from '@/components/common/Textarea/MyTextarea'; +import MyNumberInput from '@fastgpt/web/components/common/Input/NumberInput'; type ListValueType = { id: string; value: string; label: string }[]; @@ -249,8 +249,6 @@ const InputTypeConfig = ({ {t('common:core.module.Max Length')} { // @ts-ignore @@ -283,8 +279,6 @@ const InputTypeConfig = ({ {t('common:core.module.Min Value')} { // @ts-ignore diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/PluginInput.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/PluginInput.tsx index 04e2432ad..b3a93ff6c 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/PluginInput.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodePluginIO/PluginInput.tsx @@ -35,6 +35,7 @@ const FieldEditModal = dynamic(() => import('./InputEditModal')); const NodePluginInput = ({ data, selected }: NodeProps) => { const { t } = useTranslation(); const { nodeId, inputs = [], outputs } = data; + console.log(outputs); const onChangeNode = useContextSelector(WorkflowContext, (v) => v.onChangeNode); @@ -141,7 +142,7 @@ const NodePluginInput = ({ data, selected }: NodeProps) => { }} /> - {!!outputs.length && ( + {!!outputs.filter((output) => output.type !== FlowNodeOutputTypeEnum.hidden).length && ( diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeSimple.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeSimple.tsx index f2f018b0b..e1b783728 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeSimple.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeSimple.tsx @@ -15,7 +15,7 @@ import { WorkflowContext } from '../../context'; const NodeSimple = ({ data, selected, - minW = '350px', + minW = '524px', maxW }: NodeProps & { minW?: string | number; maxW?: string | number }) => { const { t } = useTranslation(); diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeSystemConfig.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeSystemConfig.tsx index d2dc34584..c0d3b06dd 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeSystemConfig.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeSystemConfig.tsx @@ -21,6 +21,7 @@ import WelcomeTextConfig from '@/components/core/app/WelcomeTextConfig'; import FileSelect from '@/components/core/app/FileSelect'; import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant'; import { userFilesInput } from '@fastgpt/global/core/workflow/template/system/workflowStart'; +import Container from '../components/Container'; type ComponentProps = { chatConfig: AppChatConfigType; @@ -49,7 +50,7 @@ const NodeUserGuide = ({ data, selected }: NodeProps) => { return ( <> ) => { }} {...data} > - + - + - + - + - + - + - + - + - + ); diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeTools.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeTools.tsx index 89165b4e9..293310f03 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeTools.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeTools.tsx @@ -26,7 +26,7 @@ const NodeTools = ({ data, selected }: NodeProps) => { - + } diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeWorkflowStart.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeWorkflowStart.tsx index 0f9a77c97..dc3cedf4d 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeWorkflowStart.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/NodeWorkflowStart.tsx @@ -65,7 +65,7 @@ const NodeStart = ({ data, selected }: NodeProps) => { return ( - {showAddIcon && ( - - )} + {showAddIcon && } ); }, [handleId, position, showAddIcon, styles, transform]); diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/Handle/style.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/Handle/style.tsx index fa135e36d..bdf356bcd 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/Handle/style.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/Handle/style.tsx @@ -1,4 +1,4 @@ -export const primaryColor = '#3370FF'; +export const primaryColor = '#487FFF'; export const lowPrimaryColor = '#94B5FF'; export const handleSize = { width: '18px', diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/NodeCard.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/NodeCard.tsx index d5c34757e..b4c54646a 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/NodeCard.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/NodeCard.tsx @@ -25,7 +25,6 @@ import MyTooltip from '@fastgpt/web/components/common/MyTooltip'; import { useRequest2 } from '@fastgpt/web/hooks/useRequest'; import { useWorkflowUtils } from '../../hooks/useUtils'; import { WholeResponseContent } from '@/components/core/chat/components/WholeResponseModal'; -import { useSystemStore } from '@/web/common/system/useSystemStore'; import { getDocPath } from '@/web/common/system/doc'; type Props = FlowNodeItemType & { @@ -149,15 +148,17 @@ const NodeCard = (props: Props) => { {/* debug */} {showHeader && ( - + {/* tool target handle */} {/* avatar and name */} {node?.flowNodeType !== FlowNodeTypeEnum.stopTool && ( - { > - + )} - + {t(name as any)} { maxW={maxW} minH={minH} bg={'white'} - borderWidth={'1px'} - borderRadius={'md'} - boxShadow={'1'} + outline={selected ? '2px solid' : '1px solid'} + borderRadius={'lg'} + boxShadow={ + '0px 4px 10px 0px rgba(19, 51, 107, 0.10), 0px 0px 1px 0px rgba(19, 51, 107, 0.10)' + } w={w} h={h} _hover={{ - boxShadow: '4', + boxShadow: + '0px 12px 16px -4px rgba(19, 51, 107, 0.20), 0px 0px 1px 0px rgba(19, 51, 107, 0.20)', '& .controller-menu': { display: 'flex' }, @@ -351,17 +355,19 @@ const NodeCard = (props: Props) => { onMouseLeave={() => setHoverNodeId(undefined)} {...(isError ? { - borderColor: 'red.500', + outlineColor: 'red.500', onMouseDownCapture: () => onUpdateNodeError(nodeId, false) } : { - borderColor: selected ? 'primary.600' : 'borderColor.base' + outlineColor: selected ? 'primary.600' : 'myGray.250' })} {...customStyle} > {Header} - {!isFolded && children} + + {!isFolded ? children : } + {RenderHandle} {RenderToolHandle} @@ -568,31 +574,35 @@ const NodeIntro = React.memo(function NodeIntro({ const Render = useMemo(() => { return ( <> - - + + {t(intro as any)} - {NodeIsTool && ( - - )} + { + if (!NodeIsTool) return; + onOpenIntroModal({ + defaultVal: intro, + onSuccess(e) { + onChangeNode({ + nodeId, + type: 'attr', + key: 'intro', + value: e + }); + } + }); + }} + > + + diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/NumberInput.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/NumberInput.tsx index e62cbdaef..c3d56142c 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/NumberInput.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/NumberInput.tsx @@ -9,6 +9,7 @@ import { } from '@chakra-ui/react'; import { useContextSelector } from 'use-context-selector'; import { WorkflowContext } from '@/pages/app/detail/components/WorkflowComponents/context'; +import MyIcon from '@fastgpt/web/components/common/Icon'; const NumberInputRender = ({ item, nodeId }: RenderInputProps) => { const onChangeNode = useContextSelector(WorkflowContext, (v) => v.onChangeNode); @@ -19,6 +20,8 @@ const NumberInputRender = ({ item, nodeId }: RenderInputProps) => { defaultValue={item.value} min={item.min} max={item.max} + bg={'white'} + rounded={'md'} onChange={(e) => { onChangeNode({ nodeId, @@ -31,10 +34,31 @@ const NumberInputRender = ({ item, nodeId }: RenderInputProps) => { }); }} > - - - - + + + + + + + + ); diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/Reference.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/Reference.tsx index 98fa1cc38..6c55025e3 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/Reference.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/Reference.tsx @@ -130,7 +130,7 @@ export const useReference = ({ label: ( - {t(node.name as any)} + {t(node.name as any)} ), value: node.nodeId, @@ -205,7 +205,7 @@ export const ReferSelector = ({ selectItemLabel ? ( {selectItemLabel[0].label} - + {selectItemLabel[1].label} ) : ( diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/SettingQuotePrompt.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/SettingQuotePrompt.tsx index b9930d972..29a847603 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/SettingQuotePrompt.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/SettingQuotePrompt.tsx @@ -302,9 +302,9 @@ const SettingQuotePrompt = (props: RenderInputProps) => { return ( <> - + {t('common:core.module.Dataset quote.label')} - + { /> - + diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderOutput/index.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderOutput/index.tsx index c1848a8cc..08278fbf1 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderOutput/index.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderOutput/index.tsx @@ -139,7 +139,7 @@ const RenderOutput = ({ diff --git a/projects/app/src/pages/dataset/detail/components/Import/commonProgress/DataProcess.tsx b/projects/app/src/pages/dataset/detail/components/Import/commonProgress/DataProcess.tsx index 004692451..31479332e 100644 --- a/projects/app/src/pages/dataset/detail/components/Import/commonProgress/DataProcess.tsx +++ b/projects/app/src/pages/dataset/detail/components/Import/commonProgress/DataProcess.tsx @@ -1,12 +1,7 @@ -import React, { useCallback, useMemo, useRef, useState } from 'react'; +import React, { useCallback, useMemo, useRef } from 'react'; import { Box, Flex, - NumberInput, - NumberInputField, - NumberInputStepper, - NumberIncrementStepper, - NumberDecrementStepper, Input, Button, ModalBody, @@ -29,6 +24,8 @@ import { useContextSelector } from 'use-context-selector'; import { DatasetImportContext } from '../Context'; import { useToast } from '@fastgpt/web/hooks/useToast'; import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel'; +import MyNumberInput from '@fastgpt/web/components/common/Input/NumberInput'; +import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip'; function DataProcess({ showPreviewChunks = true }: { showPreviewChunks: boolean }) { const { t } = useTranslation(); @@ -127,14 +124,7 @@ function DataProcess({ showPreviewChunks = true }: { showPreviewChunks: boolean {t('dataset:ideal_chunk_length')} - - - + - { + if (e === undefined) return; setValue(chunkSizeField, +e); }} - > - - - - - - + /> @@ -182,14 +160,9 @@ function DataProcess({ showPreviewChunks = true }: { showPreviewChunks: boolean {t('common:core.dataset.import.Custom split char')} - - - + { return ( <> - + {t('user:password.retrieved_account', { account: feConfigs?.systemTitle })} { if (e.keyCode === 13 && !e.shiftKey && !requesting) { handleSubmit(onclickFindPassword)(); @@ -87,6 +87,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => { { > { { @@ -148,9 +152,12 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => { { return ( { if (e.key === 'Enter' && !e.shiftKey && !requesting) { handleSubmit(onclickLogin)(); @@ -90,15 +90,17 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => { - + { > {feConfigs?.docUrl && ( - + {t('login:policy_tip')} {t('login:terms')} @@ -129,7 +137,7 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => { {t('login:privacy')} @@ -138,9 +146,11 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => { - + {feConfigs?.find_password_method && feConfigs.find_password_method.length > 0 && ( setPageType('forgetPassword')} - fontSize="sm" + fontSize="mini" > {t('login:forget_password')} )} {feConfigs?.register_method && feConfigs.register_method.length > 0 && ( - <> - + + setPageType('register')} - fontSize="sm" + fontSize="mini" > {t('login:register')} - + )} diff --git a/projects/app/src/pages/login/components/LoginForm/WechatForm.tsx b/projects/app/src/pages/login/components/LoginForm/WechatForm.tsx index 4e84072bd..365df538a 100644 --- a/projects/app/src/pages/login/components/LoginForm/WechatForm.tsx +++ b/projects/app/src/pages/login/components/LoginForm/WechatForm.tsx @@ -5,7 +5,6 @@ import { Box, Center, Image } from '@chakra-ui/react'; import { useQuery } from '@tanstack/react-query'; import { getWXLoginQR, getWXLoginResult } from '@/web/support/user/api'; import { getErrText } from '@fastgpt/global/common/error/utils'; -import { useRouter } from 'next/router'; import { useToast } from '@fastgpt/web/hooks/useToast'; import FormLayout from './components/FormLayout'; import { useTranslation } from 'next-i18next'; @@ -40,7 +39,7 @@ const WechatForm = ({ setPageType, loginSuccess }: Props) => { return ( - + {t('common:support.user.login.wx_qr_login')} diff --git a/projects/app/src/pages/login/components/LoginForm/components/FormLayout.tsx b/projects/app/src/pages/login/components/LoginForm/components/FormLayout.tsx index ea83bc4b2..b56353b4b 100644 --- a/projects/app/src/pages/login/components/LoginForm/components/FormLayout.tsx +++ b/projects/app/src/pages/login/components/LoginForm/components/FormLayout.tsx @@ -8,7 +8,6 @@ import { customAlphabet } from 'nanoid'; import { useRouter } from 'next/router'; import { Dispatch, useRef } from 'react'; import { useTranslation } from 'next-i18next'; -import Divider from '@/pages/app/detail/components/WorkflowComponents/Flow/components/Divider'; import I18nLngSelector from '@/components/Select/I18nLngSelector'; import { useSystem } from '@fastgpt/web/hooks/useSystem'; const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 8); @@ -64,7 +63,7 @@ const FormLayout = ({ children, setPageType, pageType }: Props) => { { label: t('common:support.user.login.Password login'), provider: LoginPageTypeEnum.passwordLogin, - icon: 'support/account/passwordLogin', + icon: 'support/permission/privateLight', pageType: LoginPageTypeEnum.passwordLogin } ] @@ -76,20 +75,20 @@ const FormLayout = ({ children, setPageType, pageType }: Props) => { return ( - + - + - + {feConfigs?.systemTitle} @@ -100,26 +99,21 @@ const FormLayout = ({ children, setPageType, pageType }: Props) => { <> - - + + or - + {oAuthList.map((item) => ( { backgroundSize={'cover'} userSelect={'none'} h={'100%'} - px={[0, '10vw']} > {isPc && ( @@ -149,16 +148,15 @@ const Login = ({ ChineseRedirectUrl }: { ChineseRedirectUrl: string }) => { )} @@ -174,6 +172,8 @@ const Login = ({ ChineseRedirectUrl }: { ChineseRedirectUrl: string }) => { { const { t } = useTranslation(); @@ -170,22 +161,14 @@ const ExtraPlan = () => { {t('common:support.wallet.subscription.Month amount')} - - - - - - - - + + {t('common:common.month')} @@ -195,30 +178,14 @@ const ExtraPlan = () => { {t('common:support.wallet.subscription.Update extra dataset size')} - - - - - - - - + size={'sm'} + /> + 000{t('common:core.dataset.data.unit')} @@ -291,30 +258,14 @@ const ExtraPlan = () => { position={'relative'} color={'myGray.500'} > - - - - - - - - + size={'sm'} + /> + {'000' + t('common:support.wallet.subscription.point')} diff --git a/projects/app/src/web/support/user/hooks/useSendCode.tsx b/projects/app/src/web/support/user/hooks/useSendCode.tsx index 0251d51c9..8c248ad93 100644 --- a/projects/app/src/web/support/user/hooks/useSendCode.tsx +++ b/projects/app/src/web/support/user/hooks/useSendCode.tsx @@ -64,7 +64,8 @@ export const useSendCode = ({ type }: { type: `${UserAuthTypeEnum}` }) => { position={'absolute'} right={3} zIndex={1} - fontSize={'sm'} + fontSize={'mini'} + fontWeight={'medium'} {...styles} {...(codeCountDown > 0 ? {
- {t('common:item_name')} - {t('common:item_description')}{t('common:required')}{t('common:item_name')}{t('common:item_description')}{t('common:required')}