aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/post_status_form/post_status_form.js3
-rw-r--r--src/components/post_status_form/post_status_form.vue4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index c1213fa9..8ac5ccd9 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -106,6 +106,9 @@ const PostStatusForm = {
},
charactersLeft () {
return this.statusLengthLimit - this.statusLength
+ },
+ isOverLengthLimit () {
+ return this.hasStatusLengthLimit && (this.statusLength > this.statusLengthLimit)
}
},
methods: {
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index a759bb53..aca9e9c8 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -19,9 +19,11 @@
<div class='form-bottom'>
<media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload>
- <p v-if="hasStatusLengthLimit" class="base04">{{ charactersLeft }}</p>
+ <p v-if="isOverLengthLimit" class="error">{{ charactersLeft }}</p>
+ <p v-else-if="hasStatusLengthLimit" class="base04">{{ charactersLeft }}</p>
<button v-if="posting" disabled class="btn btn-default base05 base02-background">{{$t('post_status.posting')}}</button>
+ <button v-else-if="isOverLengthLimit" disabled class="btn btn-default base05 base02-background">{{$t('general.submit')}}</button>
<button v-else :disabled="submitDisabled" type="submit" class="btn btn-default base05 base02-background">{{$t('general.submit')}}</button>
</div>
<div class='error' v-if="error">