logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/

notifications_tab.js (855B)


  1. import BooleanSetting from '../helpers/boolean_setting.vue'
  2. import SharedComputedObject from '../helpers/shared_computed_object.js'
  3. const NotificationsTab = {
  4. data () {
  5. return {
  6. activeTab: 'profile',
  7. notificationSettings: this.$store.state.users.currentUser.notification_settings,
  8. newDomainToMute: ''
  9. }
  10. },
  11. components: {
  12. BooleanSetting
  13. },
  14. computed: {
  15. user () {
  16. return this.$store.state.users.currentUser
  17. },
  18. canReceiveReports () {
  19. if (!this.user) { return false }
  20. return this.user.privileges.includes('reports_manage_reports')
  21. },
  22. ...SharedComputedObject()
  23. },
  24. methods: {
  25. updateNotificationSettings () {
  26. this.$store.state.api.backendInteractor
  27. .updateNotificationSettings({ settings: this.notificationSettings })
  28. }
  29. }
  30. }
  31. export default NotificationsTab