From 67a4514f057f67e5c0086a3c2152574d53b6d37e Mon Sep 17 00:00:00 2001 From: Bieber Date: Thu, 18 Dec 2025 17:54:27 +0800 Subject: [PATCH] feat: script integration onboarding ui T1330 --- .../BaseNodeAddResourceButton.tsx | 9 +- .../common-i18n/src/locales/en/table.json | 2 +- .../common-i18n/src/locales/zh/table.json | 2 +- packages/icons/src/components/AiAction.tsx | 19 +++-- .../icons/src/components/CreateRecord.tsx | 32 +++++-- packages/icons/src/components/GetRecord.tsx | 19 +++-- packages/icons/src/components/HttpRequest.tsx | 19 +++-- .../icons/src/components/MicrosoftTeams.tsx | 85 +++++++++++++++++++ .../icons/src/components/ScriptAction.tsx | 9 +- packages/icons/src/components/SendMail.tsx | 61 +++++++------ .../icons/src/components/UpdateRecord.tsx | 35 ++++++-- packages/icons/src/components/Zapier.tsx | 22 +++++ packages/icons/src/index.ts | 2 + 13 files changed, 246 insertions(+), 70 deletions(-) create mode 100644 packages/icons/src/components/MicrosoftTeams.tsx create mode 100644 packages/icons/src/components/Zapier.tsx diff --git a/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/BaseNodeAddResourceButton.tsx b/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/BaseNodeAddResourceButton.tsx index 6397a28ed8..c456f20dca 100644 --- a/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/BaseNodeAddResourceButton.tsx +++ b/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/BaseNodeAddResourceButton.tsx @@ -1,5 +1,5 @@ import { getUniqName, ViewType } from '@teable/core'; -import { File, FileCsv, FileExcel } from '@teable/icons'; +import { File, FileCsv, FileExcel, Slack } from '@teable/icons'; import { BaseNodeResourceType, SUPPORTEDTYPE } from '@teable/openapi'; import { useTables } from '@teable/sdk'; import { @@ -87,12 +87,14 @@ export const BaseNodeAddResourceButton = (props: BaseNodeAddResourceButtonProps) | BaseNodeResourceType.Dashboard | BaseNodeResourceType.Folder; label: string; + trailingIcon?: React.ReactNode; }> = []; if (canCreateWorkflow) { list.push({ resourceType: BaseNodeResourceType.Workflow, label: t('common:noun.newAutomation'), + trailingIcon: , }); } if (canCreateApp) { @@ -120,12 +122,12 @@ export const BaseNodeAddResourceButton = (props: BaseNodeAddResourceButtonProps) } return list.map((item) => { - const { resourceType, label } = item; + const { resourceType, label, trailingIcon } = item; const IconComponent = BaseNodeResourceIconMap[resourceType]; return ( { curdHooks.createNode?.({ resourceType, @@ -138,6 +140,7 @@ export const BaseNodeAddResourceButton = (props: BaseNodeAddResourceButtonProps) {label} + {trailingIcon} ); }); diff --git a/packages/common-i18n/src/locales/en/table.json b/packages/common-i18n/src/locales/en/table.json index fb02c0b53c..9f29bd43fd 100644 --- a/packages/common-i18n/src/locales/en/table.json +++ b/packages/common-i18n/src/locales/en/table.json @@ -1105,7 +1105,7 @@ "searchEmpty": "No matching context found", "emptyContext": "No context to add" }, - "inputPlaceholder": "Build your business app with Teable", + "inputPlaceholder": "Describe what you want to do", "thought": "Thinking", "meta": { "timeCostUnit": "s", diff --git a/packages/common-i18n/src/locales/zh/table.json b/packages/common-i18n/src/locales/zh/table.json index e5f8969f94..fbb9cce514 100644 --- a/packages/common-i18n/src/locales/zh/table.json +++ b/packages/common-i18n/src/locales/zh/table.json @@ -1105,7 +1105,7 @@ "searchEmpty": "暂无匹配的上下文", "emptyContext": "暂无可添加的上下文" }, - "inputPlaceholder": "用 Teable 构建您的商业应用", + "inputPlaceholder": "描述你想要做什么", "thought": "深度思考", "meta": { "timeCostUnit": "秒", diff --git a/packages/icons/src/components/AiAction.tsx b/packages/icons/src/components/AiAction.tsx index 5f5a91e2f0..bfbe7152e0 100644 --- a/packages/icons/src/components/AiAction.tsx +++ b/packages/icons/src/components/AiAction.tsx @@ -1,6 +1,11 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const AiAction = (props: SVGProps) => ( + +interface AiActionProps extends SVGProps { + withBackground?: boolean; +} + +const AiAction = ({ withBackground = true, ...props }: AiActionProps) => ( ) => ( viewBox="0 0 24 24" {...props} > - - + {withBackground && } + {withBackground && ( + + )} ) => ( + +interface CreateRecordProps extends SVGProps { + withBackground?: boolean; +} + +const CreateRecord = ({ withBackground = true, ...props }: CreateRecordProps) => ( ) => ( viewBox="0 0 24 24" {...props} > - - + {withBackground ? ( + + + + + ) : ( - - - - - - + )} + {withBackground && ( + + + + + + )} ); export default CreateRecord; diff --git a/packages/icons/src/components/GetRecord.tsx b/packages/icons/src/components/GetRecord.tsx index fe533c2660..a62d384799 100644 --- a/packages/icons/src/components/GetRecord.tsx +++ b/packages/icons/src/components/GetRecord.tsx @@ -1,6 +1,11 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const GetRecord = (props: SVGProps) => ( + +interface GetRecordProps extends SVGProps { + withBackground?: boolean; +} + +const GetRecord = ({ withBackground = true, ...props }: GetRecordProps) => ( ) => ( viewBox="0 0 24 24" {...props} > - - + {withBackground && } + {withBackground && ( + + )} ) => ( + +interface HttpRequestProps extends SVGProps { + withBackground?: boolean; +} + +const HttpRequest = ({ withBackground = true, ...props }: HttpRequestProps) => ( ) => ( viewBox="0 0 24 24" {...props} > - - + {withBackground && } + {withBackground && ( + + )} ) => { + return ( + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default MicrosoftTeams; diff --git a/packages/icons/src/components/ScriptAction.tsx b/packages/icons/src/components/ScriptAction.tsx index bc4bfc40b8..4858b4ddb3 100644 --- a/packages/icons/src/components/ScriptAction.tsx +++ b/packages/icons/src/components/ScriptAction.tsx @@ -1,6 +1,11 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const ScriptAction = (props: SVGProps) => ( + +interface ScriptActionProps extends SVGProps { + withBackground?: boolean; +} + +const ScriptAction = ({ withBackground = true, ...props }: ScriptActionProps) => ( ) => ( viewBox="0 0 24 24" {...props} > - + {withBackground && } ) => ( + +interface SendMailProps extends SVGProps { + withBackground?: boolean; +} + +const SendMail = ({ withBackground = true, ...props }: SendMailProps) => ( ) => ( viewBox="0 0 24 24" {...props} > - + {withBackground && } ) => ( strokeLinejoin="round" d="M17.6 7H6.4C5.627 7 5 7.56 5 8.25v7.5c0 .69.627 1.25 1.4 1.25h11.2c.773 0 1.4-.56 1.4-1.25v-7.5C19 7.56 18.373 7 17.6 7" /> - + ) => ( d="m18 10-5.382 2.852A1.34 1.34 0 0 1 12 13a1.34 1.34 0 0 1-.618-.148L6 10" /> - - - - - - - - - - - - + {withBackground && ( + + + + + + + + + + + + + )} ); export default SendMail; diff --git a/packages/icons/src/components/UpdateRecord.tsx b/packages/icons/src/components/UpdateRecord.tsx index e594c6de88..2cdfcd9f9d 100644 --- a/packages/icons/src/components/UpdateRecord.tsx +++ b/packages/icons/src/components/UpdateRecord.tsx @@ -1,6 +1,11 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const UpdateRecord = (props: SVGProps) => ( + +interface UpdateRecordProps extends SVGProps { + withBackground?: boolean; +} + +const UpdateRecord = ({ withBackground = true, ...props }: UpdateRecordProps) => ( ) => ( viewBox="0 0 24 24" {...props} > - - + {withBackground ? ( + + + + + ) : ( ) => ( strokeWidth={2} d="M9.235 17.118 16 10.353 13.647 8l-6.765 6.765L6 18zM16 6l2 2" /> - - - - - - + )} + {withBackground && ( + + + + + + )} ); export default UpdateRecord; diff --git a/packages/icons/src/components/Zapier.tsx b/packages/icons/src/components/Zapier.tsx new file mode 100644 index 0000000000..7fe65e38a1 --- /dev/null +++ b/packages/icons/src/components/Zapier.tsx @@ -0,0 +1,22 @@ +import * as React from 'react'; +import type { SVGProps } from 'react'; + +const Zapier = (props: SVGProps) => { + return ( + + + + ); +}; + +export default Zapier; diff --git a/packages/icons/src/index.ts b/packages/icons/src/index.ts index 07863dcc5b..9cf273e1be 100644 --- a/packages/icons/src/index.ts +++ b/packages/icons/src/index.ts @@ -129,6 +129,7 @@ export { default as Maximize2 } from './components/Maximize2'; export { default as Menu } from './components/Menu'; export { default as MessageSquare } from './components/MessageSquare'; export { default as Minimize2 } from './components/Minimize2'; +export { default as MicrosoftTeams } from './components/MicrosoftTeams'; export { default as Mistral } from './components/Mistral'; export { default as Moon } from './components/Moon'; export { default as MoreHorizontal } from './components/MoreHorizontal'; @@ -188,6 +189,7 @@ export { default as Webhook } from './components/Webhook'; export { default as X } from './components/X'; export { default as Xai } from './components/Xai'; export { default as Zap } from './components/Zap'; +export { default as Zapier } from './components/Zapier'; export { default as Zhipu } from './components/Zhipu'; export { default as ZoomIn } from './components/ZoomIn'; export { default as ZoomOut } from './components/ZoomOut';