feat: avoid follow button flash on hover card (#308)

This commit is contained in:
patak 2022-12-03 06:21:53 +01:00 committed by GitHub
parent 73f1f1d151
commit 3d395a02ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 13 deletions

View file

@ -1,18 +1,20 @@
<script setup lang="ts">
import type { Account } from 'masto'
defineProps<{
const { account } = defineProps<{
account: Account
}>()
const relationship = $(useRelationship(account))
</script>
<template>
<div flex="~ col gap2" rounded min-w-90 max-w-120 z-100 overflow-hidden p-4>
<div v-show="relationship" flex="~ col gap2" rounded min-w-90 max-w-120 z-100 overflow-hidden p-4>
<div flex="~ gap2" items-center>
<NuxtLink :to="getAccountRoute(account)" flex-auto rounded-full hover:bg-active transition-100 pr5 mr-a>
<AccountInfo :account="account" />
</NuxtLink>
<AccountFollowButton text-sm :account="account" />
<AccountFollowButton text-sm :account="account" :relationship="relationship" />
</div>
<ContentRich text-4 text-secondary :content="account.note" :emojis="account.emojis" />
<AccountPostsFollowers text-sm :account="account" />