Add re-hiding of nsfw images.
This commit is contained in:
parent
df51d08814
commit
6e608dd2dd
2 changed files with 25 additions and 8 deletions
|
@ -7,17 +7,23 @@ const Attachment = {
|
|||
'nsfw',
|
||||
'statusId'
|
||||
],
|
||||
data: () => ({ nsfwImage }),
|
||||
data: () => ({
|
||||
nsfwImage,
|
||||
showHidden: false
|
||||
}),
|
||||
computed: {
|
||||
type () {
|
||||
return fileTypeService.fileType(this.attachment.mimetype)
|
||||
},
|
||||
hidden () {
|
||||
return this.nsfw && !this.showHidden
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showNsfw () {
|
||||
this.$store.commit('setNsfw', { id: this.statusId, nsfw: false })
|
||||
toggleHidden () {
|
||||
this.showHidden = !this.showHidden
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Attachment
|
||||
export default Attachment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue