refactor: improve UI
This commit is contained in:
parent
1771291c08
commit
889b4b8a00
12 changed files with 54 additions and 39 deletions
|
@ -7,7 +7,7 @@ const { account } = defineProps<{
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div flex justify-between>
|
||||
<div flex justify-between hover:bg-active transition-100>
|
||||
<AccountInfo :account="account" p1 />
|
||||
<div h-full p1>
|
||||
<AccountFollowButton :account="account" />
|
||||
|
|
|
@ -17,7 +17,7 @@ async function toggleFollow() {
|
|||
<template>
|
||||
<button
|
||||
v-if="!isSelf && relationship"
|
||||
flex gap-1 items-center w-full rounded hover="op100 text-white b-purple" group
|
||||
flex gap-1 items-center h-fit rounded hover="op100 text-white b-purple" group
|
||||
@click="toggleFollow"
|
||||
>
|
||||
<div rounded w-28 p2 :group-hover="relationship?.following ? 'bg-red/30' : 'bg-purple/30'" :class="!relationship?.following ? 'bg-cyan/10' : ' bg-purple/10'">
|
||||
|
|
|
@ -24,14 +24,14 @@ const createdAt = $computed(() => {
|
|||
<AccountAvatar :account="account" w-30 h-30 />
|
||||
</NuxtLink>
|
||||
</div>
|
||||
<NuxtLink flex flex-col :to="`/@${account.acct}`">
|
||||
<div flex flex-col>
|
||||
<CommonRichContent font-bold text-2xl :content="getDisplayName(account)" :emojis="account.emojis" />
|
||||
<p op50>
|
||||
@{{ account.acct }}
|
||||
</p>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
<div flex gap-2>
|
||||
<div flex gap-2 items-center>
|
||||
<AccountFollowButton :account="account" />
|
||||
<!-- <button flex gap-1 items-center w-full rounded op75 hover="op100 text-purple" group>
|
||||
<div rounded p2 group-hover="bg-rose/10">
|
||||
|
@ -65,13 +65,13 @@ const createdAt = $computed(() => {
|
|||
</div>
|
||||
</div>
|
||||
<div flex gap-5>
|
||||
<NuxtLink :to="`/@${account.acct}/`">
|
||||
<NuxtLink :to="`/@${account.acct}/`" active-class="text-primary">
|
||||
<span font-bold>{{ account.statusesCount }}</span> Posts
|
||||
</NuxtLink>
|
||||
<NuxtLink :to="`/@${account.acct}/following`">
|
||||
<NuxtLink :to="`/@${account.acct}/following`" active-class="text-primary">
|
||||
<span font-bold>{{ account.followingCount }}</span> Following
|
||||
</NuxtLink>
|
||||
<NuxtLink :to="`/@${account.acct}/followers`">
|
||||
<NuxtLink :to="`/@${account.acct}/followers`" active-class="text-primary">
|
||||
<span font-bold>{{ account.followersCount }}</span> Followers
|
||||
</NuxtLink>
|
||||
</div>
|
||||
|
|
13
components/account/AccountLink.vue
Normal file
13
components/account/AccountLink.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import type { Account } from 'masto'
|
||||
|
||||
defineProps<{
|
||||
account: Account
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NuxtLink :to="`/@${account.acct}`">
|
||||
{{ getDisplayName(account) }}
|
||||
</NuxtLink>
|
||||
</template>
|
|
@ -13,7 +13,7 @@ const { paginator } = defineProps<{
|
|||
<template #default="{ item }">
|
||||
<AccountCard
|
||||
:account="item"
|
||||
border="b base" py-1
|
||||
border="b base" p1
|
||||
/>
|
||||
</template>
|
||||
</CommonPaginator>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue