forked from AkkomaGang/akkoma-fe
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into oauth
This commit is contained in:
commit
9f64c96721
1 changed files with 7 additions and 3 deletions
|
@ -53,7 +53,7 @@ const PostStatusForm = {
|
||||||
posting: false,
|
posting: false,
|
||||||
highlighted: 0,
|
highlighted: 0,
|
||||||
newStatus: {
|
newStatus: {
|
||||||
spoilerText: this.subject,
|
spoilerText: this.subject || '',
|
||||||
status: statusText,
|
status: statusText,
|
||||||
contentType: 'text/plain',
|
contentType: 'text/plain',
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
|
@ -128,6 +128,9 @@ const PostStatusForm = {
|
||||||
statusLength () {
|
statusLength () {
|
||||||
return this.newStatus.status.length
|
return this.newStatus.status.length
|
||||||
},
|
},
|
||||||
|
spoilerTextLength () {
|
||||||
|
return this.newStatus.spoilerText.length
|
||||||
|
},
|
||||||
statusLengthLimit () {
|
statusLengthLimit () {
|
||||||
return this.$store.state.instance.textlimit
|
return this.$store.state.instance.textlimit
|
||||||
},
|
},
|
||||||
|
@ -135,10 +138,10 @@ const PostStatusForm = {
|
||||||
return this.statusLengthLimit > 0
|
return this.statusLengthLimit > 0
|
||||||
},
|
},
|
||||||
charactersLeft () {
|
charactersLeft () {
|
||||||
return this.statusLengthLimit - this.statusLength
|
return this.statusLengthLimit - (this.statusLength + this.spoilerTextLength)
|
||||||
},
|
},
|
||||||
isOverLengthLimit () {
|
isOverLengthLimit () {
|
||||||
return this.hasStatusLengthLimit && (this.statusLength > this.statusLengthLimit)
|
return this.hasStatusLengthLimit && (this.charactersLeft < 0)
|
||||||
},
|
},
|
||||||
scopeOptionsEnabled () {
|
scopeOptionsEnabled () {
|
||||||
return this.$store.state.instance.scopeOptionsEnabled
|
return this.$store.state.instance.scopeOptionsEnabled
|
||||||
|
@ -223,6 +226,7 @@ const PostStatusForm = {
|
||||||
if (!data.error) {
|
if (!data.error) {
|
||||||
this.newStatus = {
|
this.newStatus = {
|
||||||
status: '',
|
status: '',
|
||||||
|
spoilerText: '',
|
||||||
files: [],
|
files: [],
|
||||||
visibility: newStatus.visibility,
|
visibility: newStatus.visibility,
|
||||||
contentType: newStatus.contentType
|
contentType: newStatus.contentType
|
||||||
|
|
Loading…
Reference in a new issue