diff --git a/web/src/components/table/UsersTable.js b/web/src/components/table/UsersTable.js index 31a8b2c0..02a19b80 100644 --- a/web/src/components/table/UsersTable.js +++ b/web/src/components/table/UsersTable.js @@ -119,7 +119,7 @@ const UsersTable = () => {
-
+
{displayRemark}
diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index de5d9bce..0d49d3ba 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -1199,7 +1199,7 @@ "添加用户": "Add user", "角色": "Role", "已绑定的 Telegram 账户": "Bound Telegram account", - "新额度": "New quota", + "新额度:": "New quota: ", "需要添加的额度(支持负数)": "Need to add quota (supports negative numbers)", "此项只读,需要用户通过个人设置页面的相关绑定按钮进行绑定,不可直接修改": "Read-only, user's personal settings, and cannot be modified directly", "请输入新的密码,最短 8 位": "Please enter a new password, at least 8 characterss", diff --git a/web/src/pages/User/EditUser.js b/web/src/pages/User/EditUser.js index deaefb6a..4a8f46e9 100644 --- a/web/src/pages/User/EditUser.js +++ b/web/src/pages/User/EditUser.js @@ -22,6 +22,7 @@ import { Row, Col, Input, + InputNumber, } from '@douyinfe/semi-ui'; import { IconUser, @@ -39,7 +40,7 @@ const EditUser = (props) => { const userId = props.editingUser.id; const [loading, setLoading] = useState(true); const [addQuotaModalOpen, setIsModalOpen] = useState(false); - const [addQuotaLocal, setAddQuotaLocal] = useState('0'); + const [addQuotaLocal, setAddQuotaLocal] = useState(''); const [groupOptions, setGroupOptions] = useState([]); const formApiRef = useRef(null); @@ -254,7 +255,6 @@ const EditUser = (props) => { field='quota' label={t('剩余额度')} placeholder={t('请输入新的剩余额度')} - min={0} step={500000} extraText={renderQuotaWithPrompt(values.quota || 0)} rules={[{ required: true, message: t('请输入额度') }]} @@ -328,18 +328,19 @@ const EditUser = (props) => { const current = formApiRef.current?.getValue('quota') || 0; return ( - {`${t('新额度')}${renderQuota(current)} + ${renderQuota(addQuotaLocal)} = ${renderQuota(current + parseInt(addQuotaLocal || 0))}`} + {`${t('新额度:')}${renderQuota(current)} + ${renderQuota(addQuotaLocal)} = ${renderQuota(current + parseInt(addQuotaLocal || 0))}`} ); })() }
-