|
|
@ -1,4 +1,6 @@
|
|
|
|
import statusPoster from '../../services/status_poster/status_poster.service.js'
|
|
|
|
import statusPoster from '../../services/status_poster/status_poster.service.js'
|
|
|
|
|
|
|
|
import MediaUpload from '../media_upload/media_upload.vue'
|
|
|
|
|
|
|
|
|
|
|
|
import { reject, map, uniqBy } from 'lodash';
|
|
|
|
import { reject, map, uniqBy } from 'lodash';
|
|
|
|
|
|
|
|
|
|
|
|
const buildMentionsString = ({user, attentions}, currentUser) => {
|
|
|
|
const buildMentionsString = ({user, attentions}, currentUser) => {
|
|
|
@ -23,6 +25,9 @@ const PostStatusForm = {
|
|
|
|
'repliedUser',
|
|
|
|
'repliedUser',
|
|
|
|
'attentions'
|
|
|
|
'attentions'
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
components: {
|
|
|
|
|
|
|
|
MediaUpload
|
|
|
|
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
data () {
|
|
|
|
let statusText = ''
|
|
|
|
let statusText = ''
|
|
|
|
|
|
|
|
|
|
|
@ -33,7 +38,8 @@ const PostStatusForm = {
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
newStatus: {
|
|
|
|
newStatus: {
|
|
|
|
status: statusText
|
|
|
|
status: statusText,
|
|
|
|
|
|
|
|
files: []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -41,11 +47,18 @@ const PostStatusForm = {
|
|
|
|
postStatus (newStatus) {
|
|
|
|
postStatus (newStatus) {
|
|
|
|
statusPoster.postStatus({
|
|
|
|
statusPoster.postStatus({
|
|
|
|
status: newStatus.status,
|
|
|
|
status: newStatus.status,
|
|
|
|
|
|
|
|
media: newStatus.files,
|
|
|
|
store: this.$store,
|
|
|
|
store: this.$store,
|
|
|
|
inReplyToStatusId: this.replyTo
|
|
|
|
inReplyToStatusId: this.replyTo
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.newStatus = { }
|
|
|
|
this.newStatus = {
|
|
|
|
|
|
|
|
status: '',
|
|
|
|
|
|
|
|
files: []
|
|
|
|
|
|
|
|
}
|
|
|
|
this.$emit('posted')
|
|
|
|
this.$emit('posted')
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
addMediaFile (fileInfo) {
|
|
|
|
|
|
|
|
this.newStatus.files.push(fileInfo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|