Skip to content

Commit

Permalink
fix PFP generation
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Feb 11, 2025
1 parent d724947 commit 2d582f0
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion apps/gui/src/lib/components/layout/PageHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="flex-shrink-0 mr-2">
{#if icon}
<span class="inline-block overflow-hidden rounded-full w-20 h-20">
<img src="{icon}?thumbnail" alt="relay icon" class="inline mr-2 w-full h-auto" />
<img src="{icon}" alt="relay icon" class="inline mr-2 w-full h-auto" />
</span>
{/if}
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/gui/src/lib/components/partials/MonitorDataRow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="flex-shrink-0">
{#if monitor?.profile?.photo}
<span class="rounded-full overflow-hidden">
<img src="{photo}?thumbnail" alt={photo} class="w-20 h-24" />
<img src="{photo}" alt={photo} class="w-20 h-24" />
</span>
{:else}
<span class="rounded-full overflow-hidden">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="flex-shrink-0 mr-2">
{#if monitor?.profile?.photo}
<span class="rounded-full overflow-hidden">
<img src="{monitor.profile.photo}?thumbnail" alt={monitor.profile.photo} class="w-20 h-24" />
<img src="{monitor.profile.photo}" alt={monitor.profile.photo} class="w-20 h-24" />
</span>
{:else}
<span class="rounded-full overflow-hidden inline-block">
Expand Down
2 changes: 1 addition & 1 deletion apps/gui/src/lib/config/dataTable/isps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const tableFormatters: Formatters = {
if(typeof prettyName !== 'string') return '-';
prettyName = `<span class="my-1 text-xl bg-black/10 dark:bg-white/10 py-1 px-2 rounded-sm">${prettyName}</span>`;
const icon = row.icon?
`<img src="${row.icon}?thumbnail" alt="${prettyName}" class="w-6 h-6 inline-block mr-2">`
`<img src="${row.icon}" alt="${prettyName}" class="w-6 h-6 inline-block mr-2">`
:'<span class="w-6 h-6 inline-block mr-2"></span>';
return `${icon}${prettyName}`;
},
Expand Down
6 changes: 3 additions & 3 deletions apps/gui/src/lib/config/dataTable/monitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const tableFormatters: Formatters = {
if(monitor?.photo){
profile += `
<span class="inline-block rounded-full overflow-hidden w-10 h-10">
<img src="${monitor.photo}?thumbnail" alt=${monitor.photo} class="w-full h-auto" />
<img src="${monitor.photo}" alt=${monitor.photo} class="w-full h-auto" />
</span>
`
}
Expand Down Expand Up @@ -94,14 +94,14 @@ export const filterFormatters: Formatters = {
if(monitor?.profile?.photo){
profile += `
<span class="rounded-full overflow-hidden">
<img src="${monitor?.profile?.photo}?thumbnail" alt="${monitor?.profile?.photo}" class="w-20 h-24" />
<img src="${monitor?.profile?.photo}" alt="${monitor?.profile?.photo}" class="w-20 h-24" />
</span>
`
}
else {
profile += `
<span class="rounded-full overflow-hidden inline-block">
<img src="${PFP.generate(monitor.pubkey)}" alt={photo} class="w-8 h-8" />
<img src=${PFP.generate(monitor.pubkey)}" alt={photo} class="w-8 h-8" />
</span>
`
}
Expand Down
2 changes: 1 addition & 1 deletion apps/gui/src/lib/config/dataTable/operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const tableFormatters: Formatters = {
${truncateWithEllipsis(name, 55)}
</a>`;
const photo = row.photo?
`<img src="${row.photo}?thumbnail" alt="${name}" class="w-12 h-12 inline-block mr-2 rounded-full">`
`<img src="${row.photo}" alt="${name}" class="w-12 h-12 inline-block mr-2 rounded-full">`
:'<span class="w-12 h-12 inline-block mr-2"></span>';
return `<span class="block min-w-[300px]">${photo}${nameHtml}</span>`;
},
Expand Down
4 changes: 2 additions & 2 deletions apps/gui/src/lib/config/dataTable/relays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export const tableFormatters: Formatters = {
const monitor = $monitorsMap.get(pk);
if (!monitor) return;

str += `<img src="${monitor.photo}?thumbnail" class="border border-[1px] border-black w-5 h-5 relative rounded-full inline-block opacity-${100-i*20} ${i>0? '-ml-[10px]': ''}" style="z-index: ${z};" />`;
str += `<img src="${monitor.photo}" class="border border-[1px] border-black w-5 h-5 relative rounded-full inline-block opacity-${100-i*20} ${i>0? '-ml-[10px]': ''}" style="z-index: ${z};" />`;
i++;
z--;
});
Expand Down Expand Up @@ -504,7 +504,7 @@ export const filterFormatters: Formatters = {
name = truncateWithEllipsis(profile.name, 33);
}
let image = `<span class="inline-block rounded-full overflow-hidden w-8 h-8 mr-2">
<img src="${profile.photo}?thumbnail" alt="${profile.photo}" class="w-full h-auto" />
<img src="${profile.photo}" alt="${profile.photo}" class="w-full h-auto" />
</span>`
return `<div class="flex">
<div>${image}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<div class="space-y-4">
<div class="flex items-center space-x-4">
<img src="{monitorPhoto}?thumbnail" alt="{monitorName}'s profile photo" class="h-12 w-12 rounded-full" />
<img src="{monitorPhoto}" alt="{monitorName}'s profile photo" class="h-12 w-12 rounded-full" />
<div>
<h3 class="text-lg font-semibold">{monitorName}</h3>
<p class="text-sm text-gray-500">{pubkey}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</script>

<div class="py-2">
<img src="{monitorPhoto}?thumbnail" alt="{monitorName}'s profile photo" class="h-6 w-6 mr-2 overflow-hidden rounded-full inline-block" /> <span class="inline-block">
<img src="{monitorPhoto}" alt="{monitorName}'s profile photo" class="h-6 w-6 mr-2 overflow-hidden rounded-full inline-block" /> <span class="inline-block">
{monitorName}
<span class="text-black/70 dark:text-white/70 text-sm italic">{timeAgo(check.created_at*1000)}</span>
</span>
Expand Down

0 comments on commit 2d582f0

Please sign in to comment.