Profile editing: Always show field buttons (#38152)

This commit is contained in:
Echo 2026-03-11 14:52:44 +01:00 committed by GitHub
parent 20932752fe
commit 4a08ab64d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -205,24 +205,21 @@ export const AccountEdit: FC = () => {
showDescription={!hasFields} showDescription={!hasFields}
buttons={ buttons={
<> <>
{profile.fields.length > 1 && (
<Button <Button
className={classes.editButton} className={classes.editButton}
onClick={handleCustomFieldReorder} onClick={handleCustomFieldReorder}
disabled={profile.fields.length <= 1}
> >
<FormattedMessage <FormattedMessage
id='account_edit.custom_fields.reorder_button' id='account_edit.custom_fields.reorder_button'
defaultMessage='Reorder fields' defaultMessage='Reorder fields'
/> />
</Button> </Button>
)}
{hasFields && (
<EditButton <EditButton
item={messages.customFieldsName} item={messages.customFieldsName}
onClick={handleCustomFieldAdd} onClick={handleCustomFieldAdd}
disabled={profile.fields.length >= maxFieldCount} disabled={profile.fields.length >= maxFieldCount}
/> />
)}
</> </>
} }
> >