mirror of
https://github.com/elk-zone/elk
synced 2024-11-23 22:56:09 +09:00
fix: Use favorite star icon in notifications when enabled (#2229)
This commit is contained in:
parent
cc89692d80
commit
b14a8e63c6
@ -4,6 +4,7 @@ import type { GroupedLikeNotifications } from '~/types'
|
|||||||
const { group } = defineProps<{
|
const { group } = defineProps<{
|
||||||
group: GroupedLikeNotifications
|
group: GroupedLikeNotifications
|
||||||
}>()
|
}>()
|
||||||
|
const useStarFavoriteIcon = usePreferences('useStarFavoriteIcon')
|
||||||
|
|
||||||
const reblogs = $computed(() => group.likes.filter(i => i.reblog))
|
const reblogs = $computed(() => group.likes.filter(i => i.reblog))
|
||||||
const likes = $computed(() => group.likes.filter(i => i.favourite && !i.reblog))
|
const likes = $computed(() => group.likes.filter(i => i.favourite && !i.reblog))
|
||||||
@ -27,7 +28,7 @@ const likes = $computed(() => group.likes.filter(i => i.favourite && !i.reblog))
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="likes.length" flex="~ gap-1">
|
<div v-if="likes.length" flex="~ gap-1">
|
||||||
<div i-ri:heart-fill text-xl me-1 color-red />
|
<div :class="useStarFavoriteIcon ? 'i-ri:star-fill color-yellow' : 'i-ri:heart-fill color-red'" text-xl me-1 />
|
||||||
<template v-for="i, idx of likes" :key="idx">
|
<template v-for="i, idx of likes" :key="idx">
|
||||||
<AccountHoverWrapper :account="i.account">
|
<AccountHoverWrapper :account="i.account">
|
||||||
<NuxtLink :to="getAccountRoute(i.account)">
|
<NuxtLink :to="getAccountRoute(i.account)">
|
||||||
|
Loading…
Reference in New Issue
Block a user