mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-09-07 08:36:49 +08:00
feat: add username field to profile modal
This commit is contained in:
@@ -18,6 +18,7 @@ const ProfileModal = memo(function ProfileModal({ open, onClose }: ProfileModalP
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (open && user) {
|
if (open && user) {
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
|
username: user.username || '',
|
||||||
full_name: user.full_name || '',
|
full_name: user.full_name || '',
|
||||||
email: user.email || '',
|
email: user.email || '',
|
||||||
old_password: '',
|
old_password: '',
|
||||||
@@ -63,6 +64,9 @@ const ProfileModal = memo(function ProfileModal({ open, onClose }: ProfileModalP
|
|||||||
cancelText={t('Cancel')}
|
cancelText={t('Cancel')}
|
||||||
>
|
>
|
||||||
<Form form={form} layout="vertical">
|
<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')}>
|
<Form.Item name="full_name" label={t('Full Name')}>
|
||||||
<Input placeholder={t('Full Name')} />
|
<Input placeholder={t('Full Name')} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
Reference in New Issue
Block a user