pleroma-fe/src/components/announcement/announcement.js

23 lines
397 B
JavaScript
Raw Normal View History

const Announcement = {
props: {
announcement: Object
},
computed: {
content () {
return this.announcement.content
2022-03-17 14:01:45 -04:00
},
isRead () {
return this.announcement.read
}
},
methods: {
markAsRead () {
if (!this.isRead) {
return this.$store.dispatch('markAnnouncementAsRead', this.announcement.id)
}
}
}
}
export default Announcement