pleroma-fe/src/components/interactions/interactions.js
Ilja 819b760261 Fix up and code review
* Check if it works properly
    * Notifs are shown as BE returns them
    * The Interaction view has Reports, but only when you're mod or admin
* Do some extra translations
* Fix some console spam
2022-02-26 01:53:01 +01:00

31 lines
706 B
JavaScript

import Notifications from '../notifications/notifications.vue'
const tabModeDict = {
mentions: ['mention'],
'likes+repeats': ['repeat', 'like'],
follows: ['follow'],
reactions: ['pleroma:emoji_reaction'],
reports: ['pleroma:report'],
moves: ['move']
}
const Interactions = {
data () {
return {
allowFollowingMove: this.$store.state.users.currentUser.allow_following_move,
filterMode: tabModeDict['mentions'],
canSeeReports: ['moderator', 'admin'].includes(this.$store.state.users.currentUser.role)
}
},
methods: {
onModeSwitch (key) {
this.filterMode = tabModeDict[key]
}
},
components: {
Notifications
}
}
export default Interactions