diff --git a/web/app/components/app/create-app-dialog/advanced.png b/web/app/components/app/create-app-dialog/advanced.png new file mode 100644 index 0000000000..384e29831c Binary files /dev/null and b/web/app/components/app/create-app-dialog/advanced.png differ diff --git a/web/app/components/app/create-app-dialog/appForm.tsx b/web/app/components/app/create-app-dialog/appForm.tsx index 01b91e9095..f82f29a40e 100644 --- a/web/app/components/app/create-app-dialog/appForm.tsx +++ b/web/app/components/app/create-app-dialog/appForm.tsx @@ -23,11 +23,13 @@ import TooltipPlus from '@/app/components/base/tooltip-plus' export type AppFormProps = { onConfirm: () => void onHide: () => void + onTipChange: (tip: string) => void } const AppForm = ({ onConfirm, onHide, + onTipChange, }: AppFormProps) => { const { t } = useTranslation() const router = useRouter() @@ -89,7 +91,7 @@ const AppForm = ({ return (
{/* app type */} -
+
{t('app.newApp.captionAppType')}
{showChatBotType && ( -
+
{t('app.newApp.chatbotType')}
{t('app.newApp.basic')}
- +
onTipChange('BASIC')} + onMouseLeave={() => onTipChange('')} + > + +
-
{t('app.newApp.workflow')}
- +
{t('app.newApp.advanced')}
+
onTipChange('ADVANCED')} + onMouseLeave={() => onTipChange('')} + > + +
diff --git a/web/app/components/app/create-app-dialog/basic.png b/web/app/components/app/create-app-dialog/basic.png new file mode 100644 index 0000000000..6f45192b02 Binary files /dev/null and b/web/app/components/app/create-app-dialog/basic.png differ diff --git a/web/app/components/app/create-app-dialog/index.tsx b/web/app/components/app/create-app-dialog/index.tsx index c65ae4a550..859b187d4c 100644 --- a/web/app/components/app/create-app-dialog/index.tsx +++ b/web/app/components/app/create-app-dialog/index.tsx @@ -1,6 +1,8 @@ 'use client' - +import { useState } from 'react' import { useTranslation } from 'react-i18next' +import cn from 'classnames' +import s from './style.module.css' import NewAppDialog from './newAppDialog' import AppForm from './appForm' import AppList, { PageType } from '@/app/components/explore/app-list' @@ -14,6 +16,7 @@ type CreateAppDialogProps = { const CreateAppDialog = ({ show, onSuccess, onClose }: CreateAppDialogProps) => { const { t } = useTranslation() + const [showInstruction, setShowInstruction] = useState('') return ( {/* Heading */}
{t('app.newApp.startFromBlank')}
{/* app form */} - +
{/* template list */}
{t('app.newApp.startFromTemplate')}
+
+ {showInstruction === 'BASIC' && ( + <> +
+
+
{t('app.newApp.basic')}
+
{t('app.newApp.basicFor')}
+
{t('app.newApp.basicDescription')}
+
+ + )} + {showInstruction === 'ADVANCED' && ( + <> +
+
+
{t('app.newApp.advanced')}
+
{t('app.newApp.advancedFor')}
+
{t('app.newApp.advancedDescription')}
+
+ + )} +
OR
diff --git a/web/app/components/app/create-app-dialog/style.module.css b/web/app/components/app/create-app-dialog/style.module.css new file mode 100644 index 0000000000..931a0ee851 --- /dev/null +++ b/web/app/components/app/create-app-dialog/style.module.css @@ -0,0 +1,7 @@ +.basicPic { + background-image: url('./basic.png') +} + +.advancedPic { + background-image: url('./advanced.png') +} diff --git a/web/i18n/en-US/app.ts b/web/i18n/en-US/app.ts index 30c5ec368f..f8423e601b 100644 --- a/web/i18n/en-US/app.ts +++ b/web/i18n/en-US/app.ts @@ -29,7 +29,11 @@ const translation = { workflowDescription: 'Description text here', chatbotType: 'Chatbot orchestrate method', basic: 'Basic Orchestrate', - workflow: 'Workflow Orchestrate', + basicFor: 'FOR BEGINNERS', + basicDescription: 'Basic Orchestrate allows for the orchestration of a Chatbot app using simple settings, without the ability to modify built-in prompts. It is suitable for beginners.', + advanced: 'Workflow Orchestrate', + advancedFor: 'FOR ADVANCED USERS', + advancedDescription: 'Workflow Orchestrate orchestrates Chatbots in the form of workflows, offering a high degree of customization, including the ability to edit built-in prompts. It is suitable for experienced users.', captionName: 'App icon & name', appNamePlaceholder: 'Give your app a name', captionDescription: 'Description', diff --git a/web/i18n/zh-Hans/app.ts b/web/i18n/zh-Hans/app.ts index ee754025a0..f150859a3d 100644 --- a/web/i18n/zh-Hans/app.ts +++ b/web/i18n/zh-Hans/app.ts @@ -28,7 +28,11 @@ const translation = { workflowDescription: 'Description text here', chatbotType: '聊天助手编排方法', basic: '基础编排', - workflow: '工作流编排', + basicFor: '新手适用', + basicDescription: '基本编排允许使用简单的设置编排聊天机器人应用程序,而无需修改内置提示。 它适合初学者。', + advanced: '工作流编排', + advancedFor: '进阶用户适用', + advancedDescription: '工作流编排以工作流的形式编排聊天机器人,提供高度的自定义,包括编辑内置提示的能力。 它适合有经验的用户。', captionName: '图标 & 名称', appNamePlaceholder: '给你的应用起个名字', captionDescription: '描述',