feat: add name and description fields to ListingAccount; update form, table, detail, dashboard
This commit is contained in:
@@ -54,14 +54,16 @@ export function ListingDetail({ pk, walletAddress, onUpdate, onClose, onPlaceOrd
|
||||
LISTING ACCOUNT · #{String(d.listingId)}
|
||||
</div>
|
||||
<h1 style={{ margin: 0, fontSize: 26, fontWeight: 700, letterSpacing: '-.02em' }}>
|
||||
{abbrev(pk)}
|
||||
{d.name || abbrev(pk)}
|
||||
</h1>
|
||||
</div>
|
||||
<Badge color={sc.color} bg={sc.bg}>{d.isActive ? 'Active' : 'Inactive'}</Badge>
|
||||
</div>
|
||||
{d.metadataUri && (
|
||||
{(d.description || d.metadataUri) && (
|
||||
<p style={{ margin: '0 0 24px', fontSize: 14, color: 'var(--mut)', maxWidth: 620, lineHeight: 1.55 }}>
|
||||
<a href={d.metadataUri} target="_blank" rel="noreferrer" style={{ color: 'var(--acc2light)' }}>{d.metadataUri}</a>
|
||||
{d.description || (
|
||||
<a href={d.metadataUri} target="_blank" rel="noreferrer" style={{ color: 'var(--acc2light)' }}>{d.metadataUri}</a>
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@@ -70,20 +72,22 @@ export function ListingDetail({ pk, walletAddress, onUpdate, onClose, onPlaceOrd
|
||||
<div style={{ background: 'var(--bg2)', border: '1px solid var(--bd)', borderRadius: 'var(--radius)', padding: '8px 22px 16px' }}>
|
||||
<div style={{ fontSize: 11, letterSpacing: '.13em', color: 'var(--mut)', fontWeight: 600, padding: '14px 0 4px' }}>ACCOUNT FIELDS</div>
|
||||
<FieldRow label="Address"><MonoChip value={abbrev(pk)} onCopy={() => navigator.clipboard.writeText(pk)} /></FieldRow>
|
||||
<FieldRow label="Listing ID"><span style={{ fontSize: 13.5, fontWeight: 600 }}>#{String(d.listingId)}</span></FieldRow>
|
||||
<FieldRow label="Seller"><MonoChip value={abbrev(d.seller)} onCopy={() => navigator.clipboard.writeText(d.seller)} onClick={() => router.push(`/search?q=${d.seller}`)} /></FieldRow>
|
||||
<FieldRow label="Price"><span style={{ fontSize: 13.5, fontWeight: 600 }}>{fmtListingPrice()}</span></FieldRow>
|
||||
<FieldRow label="Currency">
|
||||
<span style={{ fontFamily: 'var(--font-mono)', fontSize: 12.5 }}>
|
||||
{d.canonicalCurrency.__kind === 'Sol' ? 'SOL (native)' : `SPL · ${abbrev((d.canonicalCurrency as { mint: string }).mint)}`}
|
||||
<FieldRow label="Listing ID"><span style={{ fontFamily: 'var(--font-mono)', fontSize: 13 }}>#{String(d.listingId)}</span></FieldRow>
|
||||
<FieldRow label="Canonical Currency">
|
||||
<span style={{ fontWeight: 600, fontSize: 13 }}>
|
||||
{d.canonicalCurrency.__kind === 'Sol' ? 'SOL' : `SPL · ${abbrev((d.canonicalCurrency as { mint: string }).mint)}`}
|
||||
</span>
|
||||
</FieldRow>
|
||||
{canonicalOracleAddr && (
|
||||
<FieldRow label="Oracle">
|
||||
<MonoChip value={abbrev(canonicalOracleAddr)} onCopy={() => navigator.clipboard.writeText(canonicalOracleAddr)} />
|
||||
</FieldRow>
|
||||
)}
|
||||
<FieldRow label="Price"><span style={{ fontWeight: 700, fontSize: 13.5 }}>{fmtListingPrice()}</span></FieldRow>
|
||||
<FieldRow label="Canonical Oracle">
|
||||
{canonicalOracleAddr
|
||||
? <MonoChip value={abbrev(canonicalOracleAddr)} onCopy={() => navigator.clipboard.writeText(canonicalOracleAddr)} />
|
||||
: <span style={{ fontSize: 13, color: 'var(--mut)' }}>None — priced directly</span>
|
||||
}
|
||||
</FieldRow>
|
||||
<FieldRow label="Status"><Badge color={sc.color} bg={sc.bg}>{d.isActive ? 'Active' : 'Inactive'}</Badge></FieldRow>
|
||||
<FieldRow label="Bump"><span style={{ fontFamily: 'var(--font-mono)', fontSize: 13, color: 'var(--mut)' }}>{d.bump}</span></FieldRow>
|
||||
|
||||
{d.metadataUri && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user