File tree Expand file tree Collapse file tree 4 files changed +41
-15
lines changed
Expand file tree Collapse file tree 4 files changed +41
-15
lines changed Original file line number Diff line number Diff line change @@ -600,23 +600,37 @@ 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 = "
613+ likesData?.userHasLiked ? $t('package.likes.unlike') : $t('package.likes.like')
614614 "
615- class =" w-4 h-4"
616- aria-hidden =" true"
617- />
618- <span >{{ formatCompactNumber(likesData?.totalLikes ?? 0, { decimals: 1 }) }}</span >
619- </button >
615+ class =" inline-flex items-center gap-1.5 font-mono text-sm text-fg hover:text-fg-muted transition-colors duration-200"
616+ :aria-label ="
617+ likesData?.userHasLiked ? $t('package.likes.unlike') : $t('package.likes.like')
618+ "
619+ >
620+ <span
621+ :class ="
622+ likesData?.userHasLiked
623+ ? 'i-lucide-heart-minus text-red-500'
624+ : 'i-lucide-heart-plus'
625+ "
626+ class =" w-4 h-4"
627+ aria-hidden =" true"
628+ />
629+ <span >{{
630+ formatCompactNumber(likesData?.totalLikes ?? 0, { decimals: 1 })
631+ }}</span >
632+ </button >
633+ </TooltipApp >
620634 <template #fallback >
621635 <div
622636 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 185185 "fund" : " fund" ,
186186 "compare" : " compare"
187187 },
188+ "likes" : {
189+ "like" : " Like this package" ,
190+ "unlike" : " Unlike this package"
191+ },
188192 "docs" : {
189193 "not_available" : " Docs not available" ,
190194 "not_available_detail" : " We could not generate docs for this version."
Original file line number Diff line number Diff line change 185185 "fund" : " fund" ,
186186 "compare" : " compare"
187187 },
188+ "likes" : {
189+ "like" : " Like this package" ,
190+ "unlike" : " Unlike this package"
191+ },
188192 "docs" : {
189193 "not_available" : " Docs not available" ,
190194 "not_available_detail" : " We could not generate docs for this version."
Original file line number Diff line number Diff line change 185185 "fund" : " fund" ,
186186 "compare" : " compare"
187187 },
188+ "likes" : {
189+ "like" : " Like this package" ,
190+ "unlike" : " Unlike this package"
191+ },
188192 "docs" : {
189193 "not_available" : " Docs not available" ,
190194 "not_available_detail" : " We could not generate docs for this version."
You can’t perform that action at this time.
0 commit comments