File tree Expand file tree Collapse file tree 4 files changed +45
-18
lines changed
Expand file tree Collapse file tree 4 files changed +45
-18
lines changed Original file line number Diff line number Diff line change @@ -600,23 +600,35 @@ onKeyStroke(
600600 />
601601
602602 <!-- Package likes -->
603- <button
604- @click = " likeAction "
605- type = " button "
606- class = " inline-flex items-center gap-1.5 font-mono text-sm text-fg hover:text-fg-muted transition-colors duration-200 "
607- :title = " $t('package.links.like') "
603+ <TooltipApp
604+ :text = "
605+ likesData?.userHasLiked ? $t('package.likes.unlike') : $t('package.likes.like')
606+ "
607+ position = " bottom "
608608 >
609- <span
610- :class ="
611- likesData?.userHasLiked
612- ? 'i-lucide-heart-minus text-red-500'
613- : 'i-lucide-heart-plus'
609+ <button
610+ @click =" likeAction"
611+ type =" button"
612+ :title =" $t('package.likes.like')"
613+ class =" inline-flex items-center gap-1.5 font-mono text-sm text-fg hover:text-fg-muted transition-colors duration-200"
614+ :aria-label ="
615+ likesData?.userHasLiked ? $t('package.likes.unlike') : $t('package.likes.like')
614616 "
615- class =" w-4 h-4"
616- aria-hidden =" true"
617- />
618- <span >{{ formatCompactNumber(likesData?.totalLikes ?? 0, { decimals: 1 }) }}</span >
619- </button >
617+ >
618+ <span
619+ :class ="
620+ likesData?.userHasLiked
621+ ? 'i-lucide-heart-minus text-red-500'
622+ : 'i-lucide-heart-plus'
623+ "
624+ class =" w-4 h-4"
625+ aria-hidden =" true"
626+ />
627+ <span >{{
628+ formatCompactNumber(likesData?.totalLikes ?? 0, { decimals: 1 })
629+ }}</span >
630+ </button >
631+ </TooltipApp >
620632 <template #fallback >
621633 <div
622634 class =" flex items-center gap-1.5 list-none m-0 p-0 relative top-[5px] self-baseline ms-1 sm:ms-2"
Original file line number Diff line number Diff line change 183183 "code" : " code" ,
184184 "docs" : " docs" ,
185185 "fund" : " fund" ,
186- "compare" : " compare"
186+ "compare" : " compare" ,
187+ "like" : " like"
188+ },
189+ "likes" : {
190+ "like" : " Like this package" ,
191+ "unlike" : " Unlike this package"
187192 },
188193 "docs" : {
189194 "not_available" : " Docs not available" ,
Original file line number Diff line number Diff line change 183183 "code" : " code" ,
184184 "docs" : " docs" ,
185185 "fund" : " fund" ,
186- "compare" : " compare"
186+ "compare" : " compare" ,
187+ "like" : " like"
188+ },
189+ "likes" : {
190+ "like" : " Like this package" ,
191+ "unlike" : " Unlike this package"
187192 },
188193 "docs" : {
189194 "not_available" : " Docs not available" ,
Original file line number Diff line number Diff line change 183183 "code" : " code" ,
184184 "docs" : " docs" ,
185185 "fund" : " fund" ,
186- "compare" : " compare"
186+ "compare" : " compare" ,
187+ "like" : " like"
188+ },
189+ "likes" : {
190+ "like" : " Like this package" ,
191+ "unlike" : " Unlike this package"
187192 },
188193 "docs" : {
189194 "not_available" : " Docs not available" ,
You can’t perform that action at this time.
0 commit comments