aboutsummaryrefslogtreecommitdiff
path: root/src/components/attachment/attachment.js
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-02-28 20:27:02 +0000
committerShpuld Shpludson <shp@cock.li>2020-02-28 20:27:02 +0000
commit1b9805b550444403792db2304b5a6d5681e8f30d (patch)
tree052299372a386107d277c414148c9f3d63408c1c /src/components/attachment/attachment.js
parent3ab128e73924ce34d190ff609cb9b081cdffe402 (diff)
parent57e72b48c1fec74a860fd5abc75f0e9c4986c3f6 (diff)
Merge branch 'develop' into 'master'
Update master with 2.0.0 See merge request pleroma/pleroma-fe!1074
Diffstat (limited to 'src/components/attachment/attachment.js')
-rw-r--r--src/components/attachment/attachment.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index 06b496b0..b832e10f 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -2,6 +2,7 @@ import StillImage from '../still-image/still-image.vue'
import VideoAttachment from '../video_attachment/video_attachment.vue'
import nsfwImage from '../../assets/nsfw.png'
import fileTypeService from '../../services/file_type/file_type.service.js'
+import { mapGetters } from 'vuex'
const Attachment = {
props: [
@@ -49,7 +50,8 @@ const Attachment = {
},
fullwidth () {
return this.type === 'html' || this.type === 'audio'
- }
+ },
+ ...mapGetters(['mergedConfig'])
},
methods: {
linkClicked ({ target }) {
@@ -58,7 +60,7 @@ const Attachment = {
}
},
openModal (event) {
- const modalTypes = this.$store.getters.mergedConfig.playVideosInModal
+ const modalTypes = this.mergedConfig.playVideosInModal
? ['image', 'video']
: ['image']
if (fileTypeService.fileMatchesSomeType(modalTypes, this.attachment) ||
@@ -71,7 +73,10 @@ const Attachment = {
}
},
toggleHidden (event) {
- if (this.$store.getters.mergedConfig.useOneClickNsfw && !this.showHidden) {
+ if (
+ (this.mergedConfig.useOneClickNsfw && !this.showHidden) &&
+ (this.type !== 'video' || this.mergedConfig.playVideosInModal)
+ ) {
this.openModal(event)
return
}