diff options
| author | Roger Braun <roger@rogerbraun.net> | 2018-11-10 11:00:09 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2018-11-10 11:00:09 +0100 |
| commit | 9f64c96721028b2749f17cbf7bd910382ce58154 (patch) | |
| tree | 2980b902d77663a2ac5d6d24821b36b9f809fe17 | |
| parent | cf581b7d5a29f5164a2c1443cfbcee5cb0901bf8 (diff) | |
| parent | 2c2c4452b93efa53ff03e871e525b3a096855063 (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into oauth
| -rw-r--r-- | src/components/post_status_form/post_status_form.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index a84e764c..c0e34d72 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -53,7 +53,7 @@ const PostStatusForm = { posting: false, highlighted: 0, newStatus: { - spoilerText: this.subject, + spoilerText: this.subject || '', status: statusText, contentType: 'text/plain', nsfw: false, @@ -128,6 +128,9 @@ const PostStatusForm = { statusLength () { return this.newStatus.status.length }, + spoilerTextLength () { + return this.newStatus.spoilerText.length + }, statusLengthLimit () { return this.$store.state.instance.textlimit }, @@ -135,10 +138,10 @@ const PostStatusForm = { return this.statusLengthLimit > 0 }, charactersLeft () { - return this.statusLengthLimit - this.statusLength + return this.statusLengthLimit - (this.statusLength + this.spoilerTextLength) }, isOverLengthLimit () { - return this.hasStatusLengthLimit && (this.statusLength > this.statusLengthLimit) + return this.hasStatusLengthLimit && (this.charactersLeft < 0) }, scopeOptionsEnabled () { return this.$store.state.instance.scopeOptionsEnabled @@ -223,6 +226,7 @@ const PostStatusForm = { if (!data.error) { this.newStatus = { status: '', + spoilerText: '', files: [], visibility: newStatus.visibility, contentType: newStatus.contentType |
