Restore follow button in user lists

Signed-off-by: Louis Chemineau <louis@chmn.me>
pull/1744/head
Louis Chemineau 2023-04-20 10:06:16 +02:00
rodzic e9f9957a6d
commit c7a1189ee0
3 zmienionych plików z 9 dodań i 6 usunięć

Wyświetl plik

@ -72,10 +72,6 @@ export default {
currentUser,
],
props: {
account: {
type: String,
default: '',
},
uid: {
type: String,
default: '',

Wyświetl plik

@ -59,7 +59,7 @@
<!-- Hack to render note safely -->
<MessageContent v-if="accountInfo.note" class="user-profile__note user-profile__info" :item="{content: accountInfo.note, tag: [], mentions: []}" />
<FollowButton class="user-profile__info" :account="accountInfo.acct" :uid="uid" />
<FollowButton class="user-profile__info" :uid="uid" />
<NcButton v-if="serverData.public"
class="user-profile__info primary"
@click="followRemote">

Wyświetl plik

@ -53,7 +53,7 @@
<!-- eslint-disable-next-line vue/no-v-html -->
<p v-html="item.note" />
</div>
<FollowButton :account="item.acct" :uid="cloudId" />
<FollowButton :uid="item.acct" />
</div>
</div>
</template>
@ -61,6 +61,7 @@
<script>
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'
import currentUser from '../mixins/currentUserMixin.js'
import accountMixins from '../mixins/accountMixins.js'
import FollowButton from './FollowButton.vue'
export default {
@ -70,6 +71,7 @@ export default {
NcAvatar,
},
mixins: [
accountMixins,
currentUser,
],
props: {
@ -92,6 +94,11 @@ export default {
return !this.item.acct.includes('@')
},
},
async mounted() {
if (this.relationship === undefined) {
await this.$store.dispatch('fetchAccountRelationshipInfo', [this.item.id])
}
},
}
</script>
<style scoped lang="scss">