diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts index b6c3efb7..cd4b97e9 100644 --- a/web/src/i18n/en.ts +++ b/web/src/i18n/en.ts @@ -440,9 +440,6 @@ export const en = { logoutApiCannotRefreshToken: 'Logout API cannot refresh token', publicApiCannotRefreshToken: 'Public API cannot refresh token', refreshTokenNotExist: 'Refresh token does not exist', - SYSTEM_DEFAULT_SCENE_CANNOT_DELETE: 'This is a system preset scene and cannot be deleted', - SYSTEM_DEFAULT_CLASS_CANNOT_DELETE: 'This class is a system preset class and cannot be deleted', - SYSTEM_DEFAULT_SCENE_CANNOT_UPDATE: 'This scene is a system preset scene and cannot be modified', reset: 'Reset', refresh: 'Refresh', return: 'Return', @@ -2619,6 +2616,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re updated_at: 'Updated At', entityTypes: 'Entity Types', + classSearchPlaceholder: 'Search types', addClass: 'Add Type', class_name: 'Type Name', class_description: 'Type Definition', diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts index 3cc6ec77..f3b2a906 100644 --- a/web/src/i18n/zh.ts +++ b/web/src/i18n/zh.ts @@ -1020,9 +1020,6 @@ export const zh = { logoutApiCannotRefreshToken: '退出登录接口不能刷新token', publicApiCannotRefreshToken: '公共接口不能刷新token', refreshTokenNotExist: '刷新token不存在', - SYSTEM_DEFAULT_SCENE_CANNOT_DELETE: '该场景为系统预设场景,不允许删除', - SYSTEM_DEFAULT_CLASS_CANNOT_DELETE: '该类型为系统预设类型,不允许删除', - SYSTEM_DEFAULT_SCENE_CANNOT_UPDATE: '该场景为系统预设场景,不允许修改', reset: '重置', refresh: '刷新', return: '返回', @@ -2620,6 +2617,7 @@ export const zh = { updated_at: '更新时间', entityTypes: '实体类型', + classSearchPlaceholder: '搜索类型', addClass: '添加类型', class_name: '类型名称', class_description: '类型定义', diff --git a/web/src/views/Ontology/components/PageHeader.tsx b/web/src/views/Ontology/components/PageHeader.tsx index 56fa8cfc..b46174b2 100644 --- a/web/src/views/Ontology/components/PageHeader.tsx +++ b/web/src/views/Ontology/components/PageHeader.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 14:10:24 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 18:02:13 + * @Last Modified time: 2026-03-06 11:25:59 */ import { type FC, type ReactNode } from 'react'; import { useNavigate } from 'react-router-dom'; @@ -17,7 +17,7 @@ const { Header } = Layout; */ interface ConfigHeaderProps { /** Page title/name */ - name?: string; + name?: string | ReactNode; /** Subtitle content displayed below the title */ subTitle?: ReactNode | string; /** Extra content displayed on the right side */ diff --git a/web/src/views/Ontology/index.tsx b/web/src/views/Ontology/index.tsx index eaf1188b..bee4ebe6 100644 --- a/web/src/views/Ontology/index.tsx +++ b/web/src/views/Ontology/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 14:10:15 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-05 16:28:53 + * @Last Modified time: 2026-03-06 10:56:44 */ import { type FC, useState, useRef, type MouseEvent } from 'react'; import { useNavigate } from 'react-router-dom'; @@ -181,8 +181,8 @@ const Ontology: FC = () => { )} -
- +
+ {!item.is_system_default &&
handleEdit(item, e)} @@ -191,7 +191,7 @@ const Ontology: FC = () => { className="rb:w-5 rb:h-5 rb:cursor-pointer rb:bg-cover rb:bg-[url('@/assets/images/delete.svg')] rb:hover:bg-[url('@/assets/images/delete_hover.svg')]" onClick={(e) => handleDelete(item, e)} >
-
+ }
)} diff --git a/web/src/views/Ontology/pages/Detail.tsx b/web/src/views/Ontology/pages/Detail.tsx index 4426e96c..22e08244 100644 --- a/web/src/views/Ontology/pages/Detail.tsx +++ b/web/src/views/Ontology/pages/Detail.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 14:10:20 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 17:56:35 + * @Last Modified time: 2026-03-06 11:26:49 */ import { type FC, useEffect, useState, useRef } from 'react' import { useParams } from 'react-router-dom'; @@ -17,6 +17,7 @@ import OntologyClassModal from '../components/OntologyClassModal' import SearchInput from '@/components/SearchInput'; import OntologyClassExtractModal from '../components/OntologyClassExtractModal' import BodyWrapper from '@/components/Empty/BodyWrapper' +import Tag from '@/components/Tag' /** * Ontology detail page component @@ -99,19 +100,22 @@ const Detail: FC = () => { return ( <> + {data.scene_name} + {t('common.default')} +
} subTitle={
{data.scene_description}
} - extra={ + extra={data.is_system_default ? undefined : ( - } + )} />
setQuery({ class_name: value })} className="rb:w-full!" /> @@ -123,10 +127,10 @@ const Detail: FC = () => { handleDelete(item)} - >
} + >
)} className="rb:bg-transparent!" > diff --git a/web/src/views/Ontology/types.ts b/web/src/views/Ontology/types.ts index aad94ee0..c194f9ad 100644 --- a/web/src/views/Ontology/types.ts +++ b/web/src/views/Ontology/types.ts @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 14:10:10 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-05 16:18:56 + * @Last Modified time: 2026-03-06 10:55:23 */ /** * Query parameters for ontology list pagination and filtering @@ -94,6 +94,7 @@ export interface OntologyClassData { scene_description: string; /** Array of class items */ items: OntologyClassItem[]; + is_system_default: boolean; } /**