feat: 参考原型图 ui优化提交 企业端-企业中心 相关的页面
This commit is contained in:
@@ -43,7 +43,7 @@ const CopyTokensModal = ({ visible, onCancel, selectedKeys, copyText, t }) => {
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title={t('复制令牌')}
|
||||
title={t('复制密钥')}
|
||||
icon={null}
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
|
||||
@@ -29,14 +29,14 @@ const DeleteTokensModal = ({
|
||||
}) => {
|
||||
return (
|
||||
<Modal
|
||||
title={t('批量删除令牌')}
|
||||
title={t('批量删除密钥')}
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
onOk={onConfirm}
|
||||
type='warning'
|
||||
>
|
||||
<div>
|
||||
{t('确定要删除所选的 {{count}} 个令牌吗?', {
|
||||
{t('确定要删除所选的 {{count}} 个密钥吗?', {
|
||||
count: selectedKeys.length,
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -95,9 +95,9 @@ const EditTokenDrawer = ({
|
||||
<Drawer
|
||||
open={open}
|
||||
onClose={onCancel}
|
||||
title={isEdit ? t('编辑令牌') : t('创建令牌')}
|
||||
title={isEdit ? t('编辑密钥') : t('创建密钥')}
|
||||
width={isMobile ? '100%' : 560}
|
||||
maskClosable={false}
|
||||
maskClosable
|
||||
forceRender
|
||||
rootClassName='km-edit-drawer'
|
||||
footer={
|
||||
@@ -108,7 +108,7 @@ const EditTokenDrawer = ({
|
||||
loading={loading}
|
||||
onClick={() => formApiRef.current?.submitForm()}
|
||||
>
|
||||
{isEdit ? t('保存') : t('创建令牌')}
|
||||
{isEdit ? t('保存') : t('创建密钥')}
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
@@ -126,13 +126,13 @@ const EditTokenDrawer = ({
|
||||
<Form.Input
|
||||
field='name'
|
||||
label={t('名称')}
|
||||
placeholder={t('请输入令牌名称')}
|
||||
placeholder={t('请输入密钥名称')}
|
||||
rules={[{ required: true, message: t('请输入名称') }]}
|
||||
/>
|
||||
{groups.length > 0 ? (
|
||||
<Form.Select
|
||||
field='group'
|
||||
label={t('令牌分组')}
|
||||
label={t('密钥分组')}
|
||||
placeholder={t('选择分组,默认为用户分组')}
|
||||
optionList={groups}
|
||||
renderOptionItem={renderGroupOption}
|
||||
@@ -142,7 +142,7 @@ const EditTokenDrawer = ({
|
||||
) : (
|
||||
<Form.Select
|
||||
field='group'
|
||||
label={t('令牌分组')}
|
||||
label={t('密钥分组')}
|
||||
placeholder={t('管理员未设置用户可选分组')}
|
||||
disabled
|
||||
style={{ width: '100%' }}
|
||||
|
||||
@@ -60,7 +60,7 @@ const EditTokenModal = (props) => {
|
||||
? (key, options) => {
|
||||
const result = originalT(key, options);
|
||||
return typeof result === 'string'
|
||||
? result.replace(/令牌/g, props.labelReplace)
|
||||
? result.replace(/密钥/g, props.labelReplace)
|
||||
: result;
|
||||
}
|
||||
: originalT;
|
||||
@@ -365,7 +365,7 @@ const EditTokenModal = (props) => {
|
||||
});
|
||||
const { success, message } = res.data;
|
||||
if (success) {
|
||||
showSuccess(t('令牌更新成功!'));
|
||||
showSuccess(t('密钥更新成功!'));
|
||||
props.refresh();
|
||||
props.handleClose();
|
||||
} else {
|
||||
@@ -393,7 +393,7 @@ const EditTokenModal = (props) => {
|
||||
}
|
||||
}
|
||||
if (successCount > 0) {
|
||||
showSuccess(t('令牌创建成功,请在列表页面点击复制获取令牌!'));
|
||||
showSuccess(t('密钥创建成功,请在列表页面点击复制获取密钥!'));
|
||||
props.refresh();
|
||||
props.handleClose();
|
||||
}
|
||||
@@ -464,10 +464,10 @@ const EditTokenModal = (props) => {
|
||||
</div>
|
||||
<div>
|
||||
<h2 className='text-base font-semibold text-gray-800 dark:text-gray-100'>
|
||||
{isEdit ? t('编辑令牌') : t('创建令牌')}
|
||||
{isEdit ? t('编辑密钥') : t('创建密钥')}
|
||||
</h2>
|
||||
<p className='text-xs text-gray-500 dark:text-gray-400'>
|
||||
{isEdit ? t('修改令牌配置') : t('快速创建访问令牌')}
|
||||
{isEdit ? t('修改密钥配置') : t('快速创建访问密钥')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -506,16 +506,16 @@ const EditTokenModal = (props) => {
|
||||
<Form.Input
|
||||
field='name'
|
||||
noLabel
|
||||
placeholder={t('请输入令牌名称')}
|
||||
placeholder={t('请输入密钥名称')}
|
||||
rules={[{ required: true, message: t('请输入名称') }]}
|
||||
showClear
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* 秘钥分组 */}
|
||||
{/* 密钥分组 */}
|
||||
<div>
|
||||
<FieldLabel icon={Layers} iconColor='text-brand'>
|
||||
{t('令牌分组')}
|
||||
{t('密钥分组')}
|
||||
</FieldLabel>
|
||||
{groups.length > 0 ? (
|
||||
<Form.Select
|
||||
@@ -664,7 +664,7 @@ const EditTokenModal = (props) => {
|
||||
<Form.Switch
|
||||
field='unlimited_quota'
|
||||
label={t('无限额度')}
|
||||
extraText={t('开启后令牌不限制使用额度')}
|
||||
extraText={t('开启后密钥不限制使用额度')}
|
||||
/>
|
||||
|
||||
{!values.unlimited_quota && (
|
||||
@@ -755,7 +755,7 @@ const EditTokenModal = (props) => {
|
||||
icon={<Check size={16} />}
|
||||
loading={loading}
|
||||
>
|
||||
{isEdit ? t('保存修改') : t('创建令牌')}
|
||||
{isEdit ? t('保存修改') : t('创建密钥')}
|
||||
</Button>
|
||||
<Button
|
||||
theme='light'
|
||||
|
||||
Reference in New Issue
Block a user