Add reminder when about to post without alt text in web UI (#33760)

This commit is contained in:
Eugen Rochko 2025-01-29 12:37:56 +01:00 committed by GitHub
parent 2beab34ca4
commit 1e70da5e3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 121 additions and 13 deletions

View file

@ -10,6 +10,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import { length } from 'stringz';
import { missingAltTextModal } from 'mastodon/initial_state';
import AutosuggestInput from '../../../components/autosuggest_input';
import AutosuggestTextarea from '../../../components/autosuggest_textarea';
import { Button } from '../../../components/button';
@ -65,6 +67,7 @@ class ComposeForm extends ImmutablePureComponent {
autoFocus: PropTypes.bool,
withoutNavigation: PropTypes.bool,
anyMedia: PropTypes.bool,
missingAltText: PropTypes.bool,
isInReply: PropTypes.bool,
singleColumn: PropTypes.bool,
lang: PropTypes.string,
@ -117,7 +120,7 @@ class ComposeForm extends ImmutablePureComponent {
return;
}
this.props.onSubmit();
this.props.onSubmit(missingAltTextModal && this.props.missingAltText);
if (e) {
e.preventDefault();