forked from AkkomaGang/akkoma-fe
Added follow requests counter to nav bar to make it visible behorehand
This commit is contained in:
parent
10990e1715
commit
d831b81912
3 changed files with 17 additions and 1 deletions
|
@ -19,7 +19,10 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if='currentUser && currentUser.locked'>
|
<li v-if='currentUser && currentUser.locked'>
|
||||||
<router-link :to="{ name: 'friend-requests' }">
|
<router-link :to="{ name: 'friend-requests' }">
|
||||||
{{ $t("nav.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>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -52,6 +55,12 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.follow-request-count {
|
||||||
|
margin: -6px 10px;
|
||||||
|
background-color: $fallback--bg;
|
||||||
|
background-color: var(--input, $fallback--faint);
|
||||||
|
}
|
||||||
|
|
||||||
.nav-panel li {
|
.nav-panel li {
|
||||||
border-bottom: 1px solid;
|
border-bottom: 1px solid;
|
||||||
border-color: $fallback--border;
|
border-color: $fallback--border;
|
||||||
|
|
|
@ -45,6 +45,10 @@
|
||||||
<li v-if="currentUser && currentUser.locked" @click="toggleDrawer">
|
<li v-if="currentUser && currentUser.locked" @click="toggleDrawer">
|
||||||
<router-link to='/friend-requests'>
|
<router-link to='/friend-requests'>
|
||||||
{{ $t("nav.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>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li @click="toggleDrawer">
|
<li @click="toggleDrawer">
|
||||||
|
|
|
@ -117,6 +117,9 @@ export const parseUser = (data) => {
|
||||||
output.statuses_count = data.statuses_count
|
output.statuses_count = data.statuses_count
|
||||||
output.friends = []
|
output.friends = []
|
||||||
output.followers = []
|
output.followers = []
|
||||||
|
if (data.pleroma) {
|
||||||
|
output.follow_request_count = data.pleroma.follow_request_count
|
||||||
|
}
|
||||||
|
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue