mirror of
https://github.com/styppo/hamstr.git
synced 2024-10-18 05:23:28 +00:00
Add follow button to user card
This commit is contained in:
parent
a9f3f79dbf
commit
dd46b28561
@ -1,17 +1,19 @@
|
||||
<template>
|
||||
<div class="user-card">
|
||||
<UserAvatar :pubkey="pubkey" :clickable="clickable" />
|
||||
<UserName :pubkey="pubkey" :clickable="clickable" two-line />
|
||||
<UserName :pubkey="pubkey" :clickable="clickable" class="username" two-line />
|
||||
<FollowButton v-if="followButton" :pubkey="pubkey" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UserAvatar from 'components/User/UserAvatar.vue'
|
||||
import UserName from 'components/User/UserName.vue'
|
||||
import FollowButton from 'components/User/FollowButton.vue'
|
||||
|
||||
export default {
|
||||
name: 'UserCard',
|
||||
components: {UserName, UserAvatar},
|
||||
components: {FollowButton, UserName, UserAvatar},
|
||||
props: {
|
||||
pubkey: {
|
||||
type: String,
|
||||
@ -20,6 +22,10 @@ export default {
|
||||
clickable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
followButton: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -32,5 +38,8 @@ export default {
|
||||
* + * {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
.username {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -24,6 +24,7 @@
|
||||
:key="contact.pubkey"
|
||||
:pubkey="contact.pubkey"
|
||||
clickable
|
||||
follow-button
|
||||
/>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="followers" class="no-padding">
|
||||
@ -32,6 +33,7 @@
|
||||
:key="follower"
|
||||
:pubkey="follower"
|
||||
clickable
|
||||
follow-button
|
||||
/>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
Loading…
Reference in New Issue
Block a user