|
|
@ -88,6 +88,16 @@ const PostStatusForm = {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
postStatus (newStatus) {
|
|
|
|
postStatus (newStatus) {
|
|
|
|
if (this.posting) { return }
|
|
|
|
if (this.posting) { return }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.newStatus.status === '') {
|
|
|
|
|
|
|
|
if (this.newStatus.files.length > 0) {
|
|
|
|
|
|
|
|
this.newStatus.status = '\u200b' // hack
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.error = 'Cannot post an empty status with no files'
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.posting = true
|
|
|
|
this.posting = true
|
|
|
|
statusPoster.postStatus({
|
|
|
|
statusPoster.postStatus({
|
|
|
|
status: newStatus.status,
|
|
|
|
status: newStatus.status,
|
|
|
@ -142,6 +152,9 @@ const PostStatusForm = {
|
|
|
|
if (e.target.value === '') {
|
|
|
|
if (e.target.value === '') {
|
|
|
|
e.target.style.height = '16px'
|
|
|
|
e.target.style.height = '16px'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
clearError () {
|
|
|
|
|
|
|
|
this.error = null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|