Add characters left being displayed
This commit is contained in:
parent
e49cf7b67a
commit
6c424c355c
2 changed files with 15 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue