Merge branch 'follow-requests-for-locked-accounts' into 'develop'

Follow Request notification count for restricted accounts

See merge request pleroma/pleroma-fe!561
This commit is contained in:
Shpuld Shpludson 2019-02-19 16:38:05 +00:00
commit 0e1295edea
3 changed files with 17 additions and 1 deletions

View File

@ -20,6 +20,9 @@
<li v-if='currentUser && currentUser.locked'>
<router-link :to="{ name: 'friend-requests' }">
{{ $t("nav.friend_requests")}}
<span v-if='currentUser.follow_request_count > 0' class="badge follow-request-count">
{{currentUser.follow_request_count}}
</span>
</router-link>
</li>
<li>
@ -52,6 +55,12 @@
padding: 0;
}
.follow-request-count {
margin: -6px 10px;
background-color: $fallback--bg;
background-color: var(--input, $fallback--faint);
}
.nav-panel li {
border-bottom: 1px solid;
border-color: $fallback--border;

View File

@ -45,6 +45,10 @@
<li v-if="currentUser && currentUser.locked" @click="toggleDrawer">
<router-link to='/friend-requests'>
{{ $t("nav.friend_requests") }}
<span v-if='currentUser.follow_request_count > 0' class="badge follow-request-count">
{{currentUser.follow_request_count}}
</span>
</router-link>
</li>
<li @click="toggleDrawer">

View File

@ -117,6 +117,9 @@ export const parseUser = (data) => {
output.statuses_count = data.statuses_count
output.friends = []
output.followers = []
if (data.pleroma) {
output.follow_request_count = data.pleroma.follow_request_count
}
return output
}