Merge #81 into develop_web from feature/20251219_zy

fix(web): UI update

* feature/20251219_zy: (1 commits)
  fix(web): UI update

Signed-off-by: zhaoying <zhaoying@redbearai.com>
Merged-by: zhaoying <zhaoying@redbearai.com>

CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/81
This commit is contained in:
赵莹
2025-12-30 11:05:39 +08:00
6 changed files with 63 additions and 12 deletions

View File

@@ -86,11 +86,11 @@ const Inner: React.FC<{ getStatusTag: (status: string) => ReactNode }> = ({ getS
grid={{ gutter: 16, column: 2 }}
dataSource={data}
renderItem={(item) => (
<List.Item key={item.id}>
<List.Item key={item.id} className='rb:h-full!'>
<RbCard
className={clsx({
'rb:h-85.5!': item.config_data.tool_class === 'DateTimeTool' || item.config_data.tool_class === 'JsonTool'
})}
// className={clsx({
// 'rb:h-85.5!': item.config_data.tool_class === 'DateTimeTool' || item.config_data.tool_class === 'JsonTool'
// })}
// avatar={
// <div className="rb:w-12 rb:h-12 rb:rounded-lg rb:mr-3.25 rb:bg-[#155eef] rb:flex rb:items-center rb:justify-center rb:text-[28px] rb:text-[#ffffff]">
// {item.name[0]}

View File

@@ -130,7 +130,7 @@ const Mcp: React.FC<{ getStatusTag: (status: string) => ReactNode }> = ({ getSta
className="rb:flex rb:gap-4 rb:justify-start rb:text-[#5B6167] rb:text-[14px] rb:leading-5 rb:mb-3"
>
<div className="rb:whitespace-nowrap rb:w-27.5">{t(`tool.${key}`)}</div>
{displayValue}
<div className="rb:text-ellipsis rb:overflow-hidden rb:whitespace-nowrap rb:flex-1">{displayValue}</div>
</div>
);
})}

View File

@@ -303,15 +303,20 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
title: t('tool.requestHeaderName'),
dataIndex: 'key',
key: 'key',
width: 120,
},
{
title: t('tool.requestHeaderValue'),
dataIndex: 'value',
key: 'value',
render: (value) => {
return <div className="rb:break-all">{value}</div>
}
},
{
title: t('common.operation'),
key: 'action',
width: 80,
render: (_, record, index: number) => (
<Space size="middle">
<Button
@@ -329,6 +334,7 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
]}
initialData={requestHeaderList}
emptySize={88}
scroll={{ x: 'max-content' }}
/>
}
</div>

View File

@@ -109,10 +109,10 @@ const TimeToolModal = forwardRef<TimeToolModalRef>((_props, ref) => {
}
useEffect(() => {
if (values?.formatType) {
if (values?.formatType && data.id && activeTab === 'timeFormat') {
handleChangeFormatType()
}
}, [values?.formatType])
}, [values?.formatType, data.id, activeTab, timeZone])
// 暴露给父组件的方法
useImperativeHandle(ref, () => ({
@@ -190,7 +190,6 @@ const TimeToolModal = forwardRef<TimeToolModalRef>((_props, ref) => {
<FormItem label={t('tool.chooseFormatType')} name="formatType">
<Select
options={formatList}
onChange={handleChangeFormatType}
/>
</FormItem>
<div className="rb:mt-3 rb:bg-[#F0F3F8] rb:px-3 rb:py-2.5 rb:rounded-md">