feat: add username field to profile modal

This commit is contained in:
shiyu
2025-09-14 13:20:45 +08:00
parent 917b542dab
commit 04441d0bc4

View File

@@ -18,6 +18,7 @@ const ProfileModal = memo(function ProfileModal({ open, onClose }: ProfileModalP
useEffect(() => {
if (open && user) {
form.setFieldsValue({
username: user.username || '',
full_name: user.full_name || '',
email: user.email || '',
old_password: '',
@@ -63,6 +64,9 @@ const ProfileModal = memo(function ProfileModal({ open, onClose }: ProfileModalP
cancelText={t('Cancel')}
>
<Form form={form} layout="vertical">
<Form.Item name="username" label={t('Username')}>
<Input disabled />
</Form.Item>
<Form.Item name="full_name" label={t('Full Name')}>
<Input placeholder={t('Full Name')} />
</Form.Item>