add follow/unfollow to followed tags list

This commit is contained in:
FloatingGhost 2023-01-01 21:05:25 +00:00
parent e9f16af82d
commit 62287fffae
7 changed files with 86 additions and 30 deletions

View file

@ -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

View file

@ -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>