add follow/unfollow to followed tags list
This commit is contained in:
parent
e9f16af82d
commit
62287fffae
7 changed files with 86 additions and 30 deletions
|
@ -52,6 +52,7 @@ const UserProfile = {
|
|||
error: false,
|
||||
userId: null,
|
||||
tab: 'statuses',
|
||||
followsTab: 'users',
|
||||
footerRef: null,
|
||||
note: null,
|
||||
noteLoading: false
|
||||
|
@ -176,6 +177,9 @@ const UserProfile = {
|
|||
this.tab = tab
|
||||
this.$router.replace({ hash: `#${tab}` })
|
||||
},
|
||||
onFollowsTabSwitch (tab) {
|
||||
this.followsTab = tab
|
||||
},
|
||||
linkClicked ({ target }) {
|
||||
if (target.tagName === 'SPAN') {
|
||||
target = target.parentNode
|
||||
|
|
|
@ -106,8 +106,9 @@
|
|||
:label="$t('user_card.followees')"
|
||||
>
|
||||
<tab-switcher
|
||||
:active-tab="users"
|
||||
:active-tab="followsTab"
|
||||
:render-only-focused="true"
|
||||
:on-switch="onFollowsTabSwitch"
|
||||
>
|
||||
<div
|
||||
key="users"
|
||||
|
@ -126,12 +127,14 @@
|
|||
>
|
||||
<FollowedTagList
|
||||
:user-id="userId"
|
||||
:following="false"
|
||||
:get-key="(item) => item.name"
|
||||
>
|
||||
<template #item="{item}">
|
||||
<FollowedTagCard :tag="item" />
|
||||
</template>
|
||||
<template #empty>
|
||||
{{ $t('user_card.not_following_any_hashtags')}}
|
||||
</template>
|
||||
</FollowedTagList>
|
||||
</div>
|
||||
</tab-switcher>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue