aboutsummaryrefslogtreecommitdiff
path: root/src/components/interactions/interactions.js
blob: 1ae1d01cb9b5838d1d994bd7993c3f0343712a24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Notifications from '../notifications/notifications.vue'
import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx'

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: this.$store.state.users.currentUser.privileges.includes('reports_manage_reports')
    }
  },
  methods: {
    onModeSwitch (key) {
      this.filterMode = tabModeDict[key]
    }
  },
  components: {
    Notifications,
    TabSwitcher
  }
}

export default Interactions