Fix syntax errors and hiding logic.
This has been tested.
This commit is contained in:
parent
a7db72d7a7
commit
c338940084
4 changed files with 15 additions and 13 deletions
|
@ -7,17 +7,19 @@ const Attachment = {
|
|||
'nsfw',
|
||||
'statusId'
|
||||
],
|
||||
data: () => ({
|
||||
nsfwImage,
|
||||
hideNsfwLocal: this.$store.state.config.hideNsfw,
|
||||
showHidden: !this.hideNsfwLocal
|
||||
}),
|
||||
data () {
|
||||
return {
|
||||
nsfwImage,
|
||||
hideNsfwLocal: this.$store.state.config.hideNsfw,
|
||||
showHidden: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
type () {
|
||||
return fileTypeService.fileType(this.attachment.mimetype)
|
||||
},
|
||||
hidden () {
|
||||
return this.nsfw && !this.showHidden
|
||||
return this.nsfw && this.hideNsfwLocal && !this.showHidden
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue