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