Show pubkey copy things
Docker / build-and-push-image (push) Successful in 35s

This commit is contained in:
Jon Staab
2026-06-12 13:01:05 -07:00
parent 5587d40688
commit bd3217f43d
9 changed files with 105 additions and 23 deletions
@@ -2,9 +2,9 @@ import { A } from "@solidjs/router"
import { Show } from "solid-js"
import { getProfilePicture } from "applesauce-core/helpers/profile"
import { invoiceStatus, type Invoice } from "@/lib/api"
import CopyNpub from "@/components/CopyNpub"
import { useProfileMetadata } from "@/lib/hooks"
import { formatPeriod, formatUsd } from "@/lib/format"
import { shortenPubkey } from "@/lib/pubkey"
const invoiceStatusStyles: Record<string, string> = {
open: "bg-yellow-50 text-yellow-700 border-yellow-200",
@@ -45,7 +45,12 @@ export default function AdminInvoiceListItem(props: AdminInvoiceListItemProps) {
>
<img src={getProfilePicture(metadata())} alt="" class="h-5 w-5 flex-shrink-0 rounded-full object-cover" />
</Show>
<span class="text-xs text-gray-500 truncate">{(metadata()?.name || metadata()?.display_name) || shortenPubkey(props.invoice.tenant_pubkey)}</span>
<Show
when={metadata()?.name || metadata()?.display_name}
fallback={<CopyNpub pubkey={props.invoice.tenant_pubkey} class="text-xs text-gray-500" />}
>
<span class="text-xs text-gray-500 truncate">{metadata()?.name || metadata()?.display_name}</span>
</Show>
</div>
</Show>
</div>