aboutsummaryrefslogtreecommitdiff
path: root/src/components/nav_panel/nav_panel.js
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-12 14:17:56 +0000
committerlain <lain@soykaf.club>2020-06-12 14:17:56 +0000
commitfd109fa355ac491b86d1e10fcbfcdd577f1ac4d7 (patch)
treec27c2f3b684540b10ef9d4477349b4a8681eb7b2 /src/components/nav_panel/nav_panel.js
parent1946661911c97651ba5356db22a0ddd00ba04864 (diff)
parent48365819d14d80d2aeb7174bca05bf76eee2e8e0 (diff)
Merge branch 'develop' into 'chore/improve-default-tos'
# Conflicts: # static/terms-of-service.html
Diffstat (limited to 'src/components/nav_panel/nav_panel.js')
-rw-r--r--src/components/nav_panel/nav_panel.js25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js
index aa3f7605..8f7edb7f 100644
--- a/src/components/nav_panel/nav_panel.js
+++ b/src/components/nav_panel/nav_panel.js
@@ -1,25 +1,18 @@
-import followRequestFetcher from '../../services/follow_request_fetcher/follow_request_fetcher.service'
+import { mapState } from 'vuex'
const NavPanel = {
created () {
if (this.currentUser && this.currentUser.locked) {
- const store = this.$store
- const credentials = store.state.users.currentUser.credentials
-
- followRequestFetcher.startFetching({ store, credentials })
+ this.$store.dispatch('startFetchingFollowRequests')
}
},
- computed: {
- currentUser () {
- return this.$store.state.users.currentUser
- },
- chat () {
- return this.$store.state.chat.channel
- },
- followRequestCount () {
- return this.$store.state.api.followRequests.length
- }
- }
+ computed: mapState({
+ currentUser: state => state.users.currentUser,
+ chat: state => state.chat.channel,
+ followRequestCount: state => state.api.followRequests.length,
+ privateMode: state => state.instance.private,
+ federating: state => state.instance.federating
+ })
}
export default NavPanel