mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Profile editing: Make field buttons vanish instead of disable (#38440)
This commit is contained in:
@@ -241,21 +241,23 @@ export const AccountEdit: FC = () => {
|
|||||||
showDescription={!hasFields}
|
showDescription={!hasFields}
|
||||||
buttons={
|
buttons={
|
||||||
<div className={classes.fieldButtons}>
|
<div className={classes.fieldButtons}>
|
||||||
|
{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>
|
||||||
|
)}
|
||||||
|
{profile.fields.length < maxFieldCount && (
|
||||||
<EditButton
|
<EditButton
|
||||||
label={intl.formatMessage(messages.customFieldsAddLabel)}
|
label={intl.formatMessage(messages.customFieldsAddLabel)}
|
||||||
onClick={handleCustomFieldAdd}
|
onClick={handleCustomFieldAdd}
|
||||||
disabled={profile.fields.length >= maxFieldCount}
|
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user