Skip to content

Commit

Permalink
fix: updates image resources and fixes metrics
Browse files Browse the repository at this point in the history
- Changes fallback image path from sink.png to icon.png
- Adds lazy loading attribute to improve performance
- Fixes v-slot syntax in metrics list component
- Updates "No more" text to "No more links" for clarity
  • Loading branch information
ccbikai committed Dec 25, 2024
1 parent 480824f commit 5abc4af
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/dashboard/links/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function updateLinkList(link, type) {
v-if="!isLoading && listComplete"
class="flex items-center justify-center text-sm"
>
No more
No more links
</div>
<div
v-if="listError"
Expand Down
6 changes: 4 additions & 2 deletions components/dashboard/links/Link.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function getLinkHost(url) {
}
const shortLink = computed(() => `${origin}/${props.link.slug}`)
const linkIcon = computed(() => `https://unavatar.io/${getLinkHost(props.link.url)}?fallback=https://sink.cool/sink.png`)
const linkIcon = computed(() => `https://unavatar.io/${getLinkHost(props.link.url)}?fallback=https://sink.cool/icon.png`)
const { copy, copied } = useClipboard({ source: shortLink.value, copiedDuring: 400 })
Expand All @@ -44,11 +44,13 @@ function updateLink(link, type) {
<AvatarImage
:src="linkIcon"
alt="@radix-vue"
loading="lazy"
/>
<AvatarFallback>
<img
src="/sink.png"
src="/icon.png"
alt="Sink"
loading="lazy"
>
</AvatarFallback>
</Avatar>
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/metrics/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ defineProps({
</div>
</div>
<VList
v-slot="metric"
v-slot="{ item: metric }"
:data="metrics"
:style="{ height: '342px' }"
>
Expand Down
4 changes: 3 additions & 1 deletion components/dashboard/metrics/name/Referer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ defineProps({
<AvatarImage
:src="`https://unavatar.io/${name}?fallback=false`"
alt="@radix-vue"
loading="lazy"
/>
<AvatarFallback>
<img
src="/sink.png"
src="/icon.png"
alt="Sink"
loading="lazy"
>
</AvatarFallback>
</Avatar>
Expand Down
Binary file added public/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5abc4af

Please sign in to comment.