merge master 3.0.3, feature counter

Merge remote-tracking branch 'origin'

Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>

# Conflicts:
#	.ruby-version
#	app/javascript/mastodon/components/status.js
#	app/javascript/mastodon/features/direct_timeline/components/conversation.js
#	app/javascript/mastodon/features/getting_started/components/announcements.js
#	app/javascript/mastodon/locales/fr.json
#	config/locales/kab.yml
#	config/locales/ta.yml
#	yarn.lock
This commit is contained in:
tykayn 2021-01-13 14:28:16 +01:00 committed by Baptiste Lemoine
parent 6beaa79ab3
commit 39bcc2a0c0

View File

@ -92,7 +92,7 @@ class ComposeForm extends ImmutablePureComponent {
const fulltext = this.getFulltextForCharacterCounting();
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 500 || (isOnlyWhitespace && !anyMedia));
return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > this.props.maxTootCharsLimit || (isOnlyWhitespace && !anyMedia));
}
handleSubmit = () => {
@ -259,7 +259,10 @@ class ComposeForm extends ImmutablePureComponent {
<PrivacyDropdownContainer />
<SpoilerButtonContainer />
</div >
<div className='character-counter__wrapper'><CharacterCounter max={7777} text={this.getFulltextForCharacterCounting()} /></div>
<div className='character-counter__wrapper'><CharacterCounter
max={this.props.maxTootCharsLimit}
text={this.getFulltextForCharacterCounting()}
/></div >
</div>
<div className='compose-form__publish'>