17d2eed06a
* better-still-emoji: fix tests prevent infinite update loops remove obsolete tests removed useless code, review change, fixed bug with tall statuses fixed mentions line again remove old emoji added, everything emoji-bearing uses RichContent now richcontent support in polls, user cards and user profiles support richcontent in polls fix tests, add performance test (skipped, doesn't assert anything), tweak max mentions count made the code responsible for showing unwritten mentions actually work remove new options for style and separate line, now groups all chained mentions on a mentionsline regardless of placement. fixes spacing fix tests
78 lines
1.8 KiB
JavaScript
78 lines
1.8 KiB
JavaScript
import Attachment from '../attachment/attachment.vue'
|
|
import Poll from '../poll/poll.vue'
|
|
import Gallery from '../gallery/gallery.vue'
|
|
import StatusBody from 'src/components/status_body/status_body.vue'
|
|
import LinkPreview from '../link-preview/link-preview.vue'
|
|
import { mapGetters, mapState } from 'vuex'
|
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
import {
|
|
faCircleNotch,
|
|
faFile,
|
|
faMusic,
|
|
faImage,
|
|
faLink,
|
|
faPollH
|
|
} from '@fortawesome/free-solid-svg-icons'
|
|
|
|
library.add(
|
|
faCircleNotch,
|
|
faFile,
|
|
faMusic,
|
|
faImage,
|
|
faLink,
|
|
faPollH
|
|
)
|
|
|
|
const StatusContent = {
|
|
name: 'StatusContent',
|
|
props: [
|
|
'status',
|
|
'compact',
|
|
'focused',
|
|
'noHeading',
|
|
'fullContent',
|
|
'singleLine'
|
|
],
|
|
computed: {
|
|
hideAttachments () {
|
|
return (this.mergedConfig.hideAttachments && !this.inConversation) ||
|
|
(this.mergedConfig.hideAttachmentsInConv && this.inConversation)
|
|
},
|
|
nsfwClickthrough () {
|
|
if (!this.status.nsfw) {
|
|
return false
|
|
}
|
|
if (this.status.summary && this.localCollapseSubjectDefault) {
|
|
return false
|
|
}
|
|
return true
|
|
},
|
|
attachmentSize () {
|
|
if ((this.mergedConfig.hideAttachments && !this.inConversation) ||
|
|
(this.mergedConfig.hideAttachmentsInConv && this.inConversation) ||
|
|
(this.status.attachments.length > this.maxThumbnails)) {
|
|
return 'hide'
|
|
} else if (this.compact) {
|
|
return 'small'
|
|
}
|
|
return 'normal'
|
|
},
|
|
maxThumbnails () {
|
|
return this.mergedConfig.maxThumbnails
|
|
},
|
|
...mapGetters(['mergedConfig']),
|
|
...mapState({
|
|
currentUser: state => state.users.currentUser
|
|
})
|
|
},
|
|
components: {
|
|
Attachment,
|
|
Poll,
|
|
Gallery,
|
|
LinkPreview,
|
|
StatusBody
|
|
}
|
|
}
|
|
|
|
export default StatusContent
|