Skip to content
Snippets Groups Projects
Commit 6c424c35 authored by dtluna's avatar dtluna
Browse files

Add characters left being displayed

parent e49cf7b6
No related branches found
No related tags found
1 merge request!205Add an indicator for characters left before hitting the limit
......@@ -94,6 +94,18 @@ const PostStatusForm = {
},
customEmoji () {
return this.$store.state.config.customEmoji || []
},
statusLength () {
return this.newStatus.status.length
},
statusLengthLimit () {
return this.$store.state.config.textlimit
},
hasStatusLengthLimit () {
return this.statusLengthLimit > 0
},
charactersLeft () {
return this.statusLengthLimit - this.statusLength
}
},
methods: {
......
......@@ -18,6 +18,9 @@
</div>
<div class='form-bottom'>
<media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload>
<p v-if="hasStatusLengthLimit">{{ charactersLeft }}</p>
<button v-if="posting" disabled class="btn btn-default base05 base02-background">{{$t('post_status.posting')}}</button>
<button v-else :disabled="submitDisabled" type="submit" class="btn btn-default base05 base02-background">{{$t('general.submit')}}</button>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment