chore: enchance the copywriting of tool (#20294)

This commit is contained in:
Joel
2025-05-27 16:40:11 +08:00
committed by GitHub
parent 047a1b5166
commit abc32edf28
46 changed files with 12 additions and 44 deletions

View File

@@ -78,7 +78,7 @@ const ActionList = ({
className='w-full'
onClick={() => setShowSettingAuth(true)}
disabled={!isCurrentWorkspaceManager}
>{t('tools.auth.unauthorized')}</Button>
>{t('workflow.nodes.tool.authorize')}</Button>
)}
</div>
<div className='flex flex-col gap-2'>

View File

@@ -141,7 +141,7 @@ const MultipleToolSelector = ({
}
panelShowState={panelShowState}
onPanelShowStateChange={setPanelShowState}
isEdit={false}
/>
{value.length === 0 && (
<div className='system-xs-regular flex justify-center rounded-[10px] bg-background-section p-3 text-text-tertiary'>{t('plugin.detailPanel.toolSelector.empty')}</div>
@@ -158,6 +158,7 @@ const MultipleToolSelector = ({
onSelect={item => handleConfigure(item, index)}
onDelete={() => handleDelete(index)}
supportEnableSwitch
isEdit
/>
</div>
))}

View File

@@ -54,6 +54,7 @@ type Props = {
scope?: string
value?: ToolValue
selectedTools?: ToolValue[]
isEdit?: boolean
onSelect: (tool: {
provider_name: string
tool_name: string
@@ -77,6 +78,7 @@ type Props = {
const ToolSelector: FC<Props> = ({
value,
selectedTools,
isEdit,
disabled,
placement = 'left',
offset = 4,
@@ -277,7 +279,7 @@ const ToolSelector: FC<Props> = ({
<div className={cn('relative max-h-[642px] min-h-20 w-[361px] rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur pb-4 shadow-lg backdrop-blur-sm', !isShowSettingAuth && 'overflow-y-auto pb-2')}>
{!isShowSettingAuth && (
<>
<div className='system-xl-semibold px-4 pb-1 pt-3.5 text-text-primary'>{t('plugin.detailPanel.toolSelector.title')}</div>
<div className='system-xl-semibold px-4 pb-1 pt-3.5 text-text-primary'>{t(`plugin.detailPanel.toolSelector.${isEdit ? 'toolSetting' : 'title'}`)}</div>
{/* base form */}
<div className='flex flex-col gap-3 px-4 py-2'>
<div className='flex flex-col gap-1'>