1
0
Fork 0
forked from fedi/mastodon

Remove “No description added” media warning in edit mode (#20393)

Editing media metadata is not currently possible in edit mode, the button would
open the modal but saving the changes would error out.
This commit is contained in:
Claire 2022-11-11 09:20:24 +01:00 committed by GitHub
parent 9bc0a6c861
commit 5e796dc6f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@ export default class Upload extends ImmutablePureComponent {
{!isEditingStatus && (<button type='button' className='icon-button' onClick={this.handleFocalPointClick}><Icon id='pencil' /> <FormattedMessage id='upload_form.edit' defaultMessage='Edit' /></button>)} {!isEditingStatus && (<button type='button' className='icon-button' onClick={this.handleFocalPointClick}><Icon id='pencil' /> <FormattedMessage id='upload_form.edit' defaultMessage='Edit' /></button>)}
</div> </div>
{(media.get('description') || '').length === 0 && ( {(media.get('description') || '').length === 0 && !isEditingStatus && (
<div className='compose-form__upload__warning'> <div className='compose-form__upload__warning'>
<button type='button' className='icon-button' onClick={this.handleFocalPointClick}><Icon id='info-circle' /> <FormattedMessage id='upload_form.description_missing' defaultMessage='No description added' /></button> <button type='button' className='icon-button' onClick={this.handleFocalPointClick}><Icon id='info-circle' /> <FormattedMessage id='upload_form.description_missing' defaultMessage='No description added' /></button>
</div> </div>