diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2020-07-14 11:44:06 +0300 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2020-07-14 11:44:06 +0300 |
| commit | cac1418affbc0ae91bce2a4d4c14046e73484116 (patch) | |
| tree | b8a9ef91853d7f4d3f35e632e0b3e71b5dd79c7d /src/components/nav_panel | |
| parent | 78ec84477e978a654ecfd482157dbf04a69f32e2 (diff) | |
| parent | 3e09a708f600b47dde831eeddb412828b38a0cf4 (diff) | |
fix merge conflicts
Diffstat (limited to 'src/components/nav_panel')
| -rw-r--r-- | src/components/nav_panel/nav_panel.js | 8 | ||||
| -rw-r--r-- | src/components/nav_panel/nav_panel.vue | 11 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js index d9e87a1b..6ed7fc33 100644 --- a/src/components/nav_panel/nav_panel.js +++ b/src/components/nav_panel/nav_panel.js @@ -1,5 +1,5 @@ -import { mapState } from 'vuex' import { timelineNames } from '../timeline_menu/timeline_menu.js' +import { mapState, mapGetters } from 'vuex' const NavPanel = { created () { @@ -18,8 +18,10 @@ const NavPanel = { currentUser: state => state.users.currentUser, followRequestCount: state => state.api.followRequests.length, privateMode: state => state.instance.private, - federating: state => state.instance.federating - }) + federating: state => state.instance.federating, + pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable + }), + ...mapGetters(['unreadChatCount']) } } diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue index dd6a433b..f8459fd1 100644 --- a/src/components/nav_panel/nav_panel.vue +++ b/src/components/nav_panel/nav_panel.vue @@ -15,6 +15,17 @@ <i class="button-icon icon-bell-alt" /> {{ $t("nav.interactions") }} </router-link> </li> + <li v-if="currentUser && pleromaChatMessagesAvailable"> + <router-link :to="{ name: 'chats', params: { username: currentUser.screen_name } }"> + <div + v-if="unreadChatCount" + class="badge badge-notification unread-chat-count" + > + {{ unreadChatCount }} + </div> + <i class="button-icon icon-chat" /> {{ $t("nav.chats") }} + </router-link> + </li> <li v-if="currentUser && currentUser.locked"> <router-link :to="{ name: 'friend-requests' }"> <i class="button-icon icon-user-plus" /> {{ $t("nav.friend_requests") }} |
