diff --git a/components/account/AccountCard.vue b/components/account/AccountCard.vue index 80632d08..7d144995 100644 --- a/components/account/AccountCard.vue +++ b/components/account/AccountCard.vue @@ -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" /> diff --git a/components/account/AccountFollowButton.vue b/components/account/AccountFollowButton.vue index 406cfe41..80bfc05f 100644 --- a/components/account/AccountFollowButton.vue +++ b/components/account/AccountFollowButton.vue @@ -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'"> diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index b33a8834..f52fcc10 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -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> diff --git a/components/account/AccountLink.vue b/components/account/AccountLink.vue new file mode 100644 index 00000000..ddfb0a45 --- /dev/null +++ b/components/account/AccountLink.vue @@ -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> diff --git a/components/account/AccountPaginator.vue b/components/account/AccountPaginator.vue index 271a4f88..1d5837ea 100644 --- a/components/account/AccountPaginator.vue +++ b/components/account/AccountPaginator.vue @@ -13,7 +13,7 @@ const { paginator } = defineProps<{ <template #default="{ item }"> <AccountCard :account="item" - border="b base" py-1 + border="b base" p1 /> </template> </CommonPaginator> diff --git a/components/common/CommonTabs.vue b/components/common/CommonTabs.vue index e5274409..c7b1eabb 100644 --- a/components/common/CommonTabs.vue +++ b/components/common/CommonTabs.vue @@ -27,7 +27,7 @@ function toValidName(otpion: string) { flex flex-1 cursor-pointer p3 m1 rounded transition-all :for="`tab-${toValidName(option)}`" tabindex="1" - hover:bg-active + hover:bg-active transition-100 @keypress.enter="modelValue = option" ><span mxa px2 diff --git a/components/nav/NavSide.vue b/components/nav/NavSide.vue index 4a40e232..536407d4 100644 --- a/components/nav/NavSide.vue +++ b/components/nav/NavSide.vue @@ -4,41 +4,41 @@ <template> <div px6 py2 flex="~ col gap6" text-lg> <template v-if="currentUser"> - <NuxtLink flex gap2 items-center to="/home" active-class="text-primary"> + <NuxtLink flex gap2 items-center transition-100 to="/home" active-class="text-primary"> <div i-ri:home-5-line /> <span>Home</span> </NuxtLink> - <NuxtLink flex gap2 items-center to="/notifications" active-class="text-primary"> + <NuxtLink flex gap2 items-center transition-100 to="/notifications" active-class="text-primary"> <div i-ri:notification-4-line /> <span>Notifications</span> </NuxtLink> </template> - <NuxtLink flex gap2 items-center to="/explore" active-class="text-primary"> + <NuxtLink flex gap2 items-center transition-100 to="/explore" active-class="text-primary"> <div i-ri:hashtag /> <span>Explore</span> </NuxtLink> - <NuxtLink flex gap2 items-center to="/public/local" active-class="text-primary"> + <NuxtLink flex gap2 items-center transition-100 to="/public/local" active-class="text-primary"> <div i-ri:group-2-line /> <span>Local</span> </NuxtLink> - <NuxtLink flex gap2 items-center to="/public" active-class="text-primary"> + <NuxtLink flex gap2 items-center transition-100 to="/public" active-class="text-primary"> <div i-ri:earth-line /> <span>Federated</span> </NuxtLink> <template v-if="currentUser"> - <NuxtLink flex gap2 items-center to="/conversations" active-class="text-primary"> + <NuxtLink flex gap2 items-center transition-100 to="/conversations" active-class="text-primary"> <div i-ri:at-line /> <span>Conversations</span> </NuxtLink> - <NuxtLink flex gap2 items-center to="/favourites" active-class="text-primary"> + <NuxtLink flex gap2 items-center transition-100 to="/favourites" active-class="text-primary"> <div i-ri:heart-3-line /> <span>Favorites</span> </NuxtLink> - <NuxtLink flex gap2 items-center to="/bookmarks" active-class="text-primary"> + <NuxtLink flex gap2 items-center transition-100 to="/bookmarks" active-class="text-primary"> <div i-ri:bookmark-line /> <span>Bookmarks</span> </NuxtLink> - <NuxtLink flex gap2 items-center :to="`/@${currentUser.account?.username}`" active-class="text-primary"> + <NuxtLink flex gap2 items-center transition-100 :to="`/@${currentUser.account?.username}`" active-class="text-primary"> <AccountAvatar :account="currentUser.account" h="1.2em" /> <span>Profile</span> </NuxtLink> diff --git a/components/notification/NotificationCard.vue b/components/notification/NotificationCard.vue index a445ce24..4ad11812 100644 --- a/components/notification/NotificationCard.vue +++ b/components/notification/NotificationCard.vue @@ -4,34 +4,36 @@ import type { Notification } from 'masto' const { notification } = defineProps<{ notification: Notification }>() - -const displayName = $computed(() => getDisplayName(notification.account)) </script> <template> <div flex flex-col> <template v-if="notification.type === 'follow'"> - <div flex ml-4> - <div i-ri:user-follow-fill mr-3 color-purple />{{ displayName }} followed you + <div flex ml-4 items-center> + <div i-ri:user-follow-fill mr-3 color-purple /> + <AccountLink :account="notification.account" mr1 /> followed you </div> <AccountCard :account="notification.account" p3 /> </template> <template v-if="notification.type === 'follow_request'"> - <div flex ml-4> - <div i-ri:user-follow-fill mr-3 />{{ displayName }} requested to follow you + <div flex ml-4 items-center> + <div i-ri:user-follow-fill mr-3 /> + <AccountLink :account="notification.account" mr1 /> requested to follow you </div> <!-- TODO: accept request --> <AccountCard :account="notification.account" p3 /> </template> <template v-if="notification.type === 'favourite'"> - <div flex ml-4> - <div i-ri:heart-fill mr-3 color-red />{{ displayName }} favourited your post + <div flex ml-4 items-center> + <div i-ri:heart-fill mr-3 color-red /> + <AccountLink :account="notification.account" mr1 /> favourited your post </div> <StatusCard :status="notification.status!" p3 /> </template> <template v-if="notification.type === 'reblog'"> - <div flex ml-4> - <div i-ri:repeat-fill mr-3 color-green />{{ displayName }} reblogged your post + <div flex ml-4 items-center> + <div i-ri:repeat-fill mr-3 color-green /> + <AccountLink :account="notification.account" mr1 /> reblogged your post </div> <StatusCard :status="notification.status!" p3 /> </template> diff --git a/components/status/StatusActions.vue b/components/status/StatusActions.vue index 36139470..5e0c9d9d 100644 --- a/components/status/StatusActions.vue +++ b/components/status/StatusActions.vue @@ -36,15 +36,15 @@ const toggleBookmark = () => toggleStatusAction( </script> <template> - <div flex gap-8> - <RouterLink flex gap-1 items-center w-full rounded op50 hover="op100 text-blue" group :to="`/@${status.account.acct}/${status.id}`"> + <div flex justify-between gap-8> + <RouterLink flex gap-1 items-center rounded op50 hover="op100 text-blue" group :to="`/@${status.account.acct}/${status.id}`"> <div rounded-full p2 group-hover="bg-blue/10"> <div i-ri:chat-3-line /> </div> <span v-if="status.repliesCount">{{ status.repliesCount }}</span> </RouterLink> <button - flex gap-1 items-center w-full rounded op50 hover="op100 text-green" group + flex gap-1 items-center rounded op50 hover="op100 text-green" group :class="(status.reblogged ? 'text-green op100' : 'op50') + (isLoading.reblogged ? ' pointer-events-none' : '')" @click="toggleReblog()" > @@ -54,7 +54,7 @@ const toggleBookmark = () => toggleStatusAction( <span v-if="status.reblogsCount">{{ status.reblogsCount }}</span> </button> <button - flex gap-1 items-center w-full rounded hover="op100 text-rose" group + flex gap-1 items-center rounded hover="op100 text-rose" group :class="status.favourited ? 'text-rose op100' : 'op50'" @click="toggleFavourite()" > @@ -64,7 +64,7 @@ const toggleBookmark = () => toggleStatusAction( <span v-if="status.favouritesCount">{{ status.favouritesCount }}</span> </button> <button - flex gap-1 items-center w-full rounded hover="op100 text-yellow" group + flex gap-1 items-center rounded hover="op100 text-yellow" group :class="status.bookmarked ? 'text-yellow op100' : 'op50'" @click="toggleBookmark()" > @@ -72,7 +72,7 @@ const toggleBookmark = () => toggleStatusAction( <div :class="(status.bookmarked ? 'i-ri:bookmark-fill' : 'i-ri:bookmark-line') + (isLoading.bookmarked ? ' pointer-events-none' : '')" /> </div> </button> - <!-- <button flex gap-1 items-center w-full rounded op50 hover="op100 text-purple" group> + <!-- <button flex gap-1 items-center rounded op50 hover="op100 text-purple" group> <div rounded-full p2 group-hover="bg-purple/10"> <div i-ri:share-circle-line /> </div> diff --git a/components/status/StatusCard.vue b/components/status/StatusCard.vue index 6686c25c..0f68391d 100644 --- a/components/status/StatusCard.vue +++ b/components/status/StatusCard.vue @@ -63,7 +63,7 @@ const timeago = useTimeAgo(() => status.createdAt, { </script> <template> - <div ref="el" flex flex-col gap-2 px-4 hover:bg="gray/10" transition="duration-100" cursor-pointer @click="go"> + <div ref="el" flex flex-col gap-2 px-4 hover:bg-active transition-100 cursor-pointer @click="go"> <div v-if="rebloggedBy" pl8> <div flex gap-1 items-center text-gray:75 text-sm> <div i-ri:repeat-fill mr-1 /> @@ -92,6 +92,6 @@ const timeago = useTimeAgo(() => status.createdAt, { :actions="false" /> </div> - <StatusActions v-if="actions !== false" pl13 :status="status" /> + <StatusActions v-if="actions !== false" px13 :status="status" /> </div> </template> diff --git a/components/user/UserSwitcher.vue b/components/user/UserSwitcher.vue index 2ac4f7eb..05b7ef46 100644 --- a/components/user/UserSwitcher.vue +++ b/components/user/UserSwitcher.vue @@ -21,7 +21,7 @@ const sorted = computed(() => { :link="false" :full-server="true" rounded p2 - hover:bg-active cursor-pointer + hover:bg-active cursor-pointer transition-100 @click="loginTo(user)" > <template v-if="user.token === currentUser?.token"> diff --git a/layouts/default.vue b/layouts/default.vue index e074f9cd..2b741f86 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -12,7 +12,7 @@ <AccountInfo v-if="currentUser" mx4 mb4 p2 rounded - hover:bg-active cursor-pointer + hover:bg-active cursor-pointer transition-100 :account="currentUser?.account" :link="false" @click="openUserSwitcher"