From 3bb38b16f3afbbfbf09b325922e93d0ac0bc4a88 Mon Sep 17 00:00:00 2001 From: Dunqing Date: Wed, 30 Aug 2023 10:32:39 +0800 Subject: [PATCH] feat(api-keys): add tooltip for roles (#2567) * feat(api-keys): add tooltip for roles * feat: improve --- packages/plugins/api-keys/src/client/Configuration/schema.tsx | 3 +++ packages/plugins/api-keys/src/locale/zh-CN.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/packages/plugins/api-keys/src/client/Configuration/schema.tsx b/packages/plugins/api-keys/src/client/Configuration/schema.tsx index b348cd561..d28365d60 100644 --- a/packages/plugins/api-keys/src/client/Configuration/schema.tsx +++ b/packages/plugins/api-keys/src/client/Configuration/schema.tsx @@ -118,6 +118,9 @@ export const configurationSchema: ISchema = { type: 'string', title: generateNTemplate('Role'), required: true, + 'x-decorator-props': { + tooltip: generateNTemplate('Allow only your own roles to be selected'), + }, 'x-collection-field': 'apiKeys.role', 'x-component': 'CollectionField', 'x-decorator': 'FormItem', diff --git a/packages/plugins/api-keys/src/locale/zh-CN.ts b/packages/plugins/api-keys/src/locale/zh-CN.ts index bab920eb3..e91c21165 100644 --- a/packages/plugins/api-keys/src/locale/zh-CN.ts +++ b/packages/plugins/api-keys/src/locale/zh-CN.ts @@ -17,6 +17,7 @@ const locale = { '30 Days': '30 天', '90 Days': '90 天', 'Role not found': '角色不存在', + 'Allow only your own roles to be selected': '只允许选择你自己拥有的角色', }; export default locale;