diff --git a/web/src/components/playground/CodeViewer.jsx b/web/src/components/common/ui/CodeViewer.jsx
similarity index 99%
rename from web/src/components/playground/CodeViewer.jsx
rename to web/src/components/common/ui/CodeViewer.jsx
index 9d8ae453a..b614d7c33 100644
--- a/web/src/components/playground/CodeViewer.jsx
+++ b/web/src/components/common/ui/CodeViewer.jsx
@@ -21,7 +21,7 @@ import React, { useState, useMemo, useCallback } from 'react';
import { Button, Tooltip, Toast } from '@douyinfe/semi-ui';
import { Copy, ChevronDown, ChevronUp } from 'lucide-react';
import { useTranslation } from 'react-i18next';
-import { copy } from '../../helpers';
+import { copy } from '../../../helpers';
const PERFORMANCE_CONFIG = {
MAX_DISPLAY_LENGTH: 50000, // 最大显示字符数
diff --git a/web/src/components/playground/DebugPanel.jsx b/web/src/components/playground/DebugPanel.jsx
index d931ff61c..7f8fd0387 100644
--- a/web/src/components/playground/DebugPanel.jsx
+++ b/web/src/components/playground/DebugPanel.jsx
@@ -28,7 +28,7 @@ import {
} from '@douyinfe/semi-ui';
import { Code, Zap, Clock, X, Eye, Send } from 'lucide-react';
import { useTranslation } from 'react-i18next';
-import CodeViewer from './CodeViewer';
+import CodeViewer from '../common/ui/CodeViewer';
const DebugPanel = ({
debugData,
diff --git a/web/src/components/settings/oauth2/OAuth2ClientSettings.jsx b/web/src/components/settings/oauth2/OAuth2ClientSettings.jsx
index def4df899..02e33cd03 100644
--- a/web/src/components/settings/oauth2/OAuth2ClientSettings.jsx
+++ b/web/src/components/settings/oauth2/OAuth2ClientSettings.jsx
@@ -31,7 +31,7 @@ import {
Tooltip,
} from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
-import { User, Grid3X3 } from 'lucide-react';
+import { User } from 'lucide-react';
import { API, showError, showSuccess } from '../../../helpers';
import CreateOAuth2ClientModal from './modals/CreateOAuth2ClientModal';
import EditOAuth2ClientModal from './modals/EditOAuth2ClientModal';
@@ -138,13 +138,14 @@ export default function OAuth2ClientSettings() {
{
title: t('客户端名称'),
dataIndex: 'name',
- render: (name) => (
-
+ render: (name, record) => (
+
- {name}
+
+ {name}
+
),
- width: 150,
},
{
title: t('客户端ID'),
@@ -154,30 +155,24 @@ export default function OAuth2ClientSettings() {
{id}
),
- width: 200,
},
{
- title: t('描述'),
- dataIndex: 'description',
- render: (description) => (
-
- {description || '-'}
-
+ title: t('状态'),
+ dataIndex: 'status',
+ render: (status) => (
+
+ {status === 1 ? t('启用') : t('禁用')}
+
),
- width: 150,
},
{
title: t('类型'),
dataIndex: 'client_type',
render: (text) => (
-
+
{text === 'confidential' ? t('机密客户端') : t('公开客户端')}
),
- width: 120,
},
{
title: t('授权类型'),
@@ -195,7 +190,7 @@ export default function OAuth2ClientSettings() {
return (
{types.slice(0, 2).map((type) => (
-
+
{typeMap[type] || type}
))}
@@ -206,7 +201,7 @@ export default function OAuth2ClientSettings() {
.map((t) => typeMap[t] || t)
.join(', ')}
>
-
+
+{types.length - 2}
@@ -214,106 +209,54 @@ export default function OAuth2ClientSettings() {
);
},
- width: 150,
- },
- {
- title: t('状态'),
- dataIndex: 'status',
- render: (status) => (
-
- {status === 1 ? t('启用') : t('禁用')}
-
- ),
- width: 80,
},
{
title: t('创建时间'),
dataIndex: 'created_time',
render: (time) => new Date(time * 1000).toLocaleString(),
- width: 150,
},
{
title: t('操作'),
render: (_, record) => (
{record.client_type === 'confidential' && (
-
- {t('客户端')}:
- {record.name}
-
-
-
- ⚠️ {t('操作不可撤销,旧密钥将立即失效。')}
-
-
-
- }
+ content={t('操作不可撤销,旧密钥将立即失效。')}
onConfirm={() => handleRegenerateSecret(record)}
okText={t('确认')}
cancelText={t('取消')}
position='bottomLeft'
>
-