feat: BTCPay webhook for auto-publish after confirmation, processing badge

This commit is contained in:
2026-02-06 15:03:56 +01:00
parent fcf22617d0
commit d9202f9ca2
8 changed files with 191 additions and 16 deletions

View File

@@ -265,7 +265,21 @@ class PageListing extends HTMLElement {
renderSidebar() {
// Owner view: show edit button instead of contact
if (this.isOwner) {
const paymentProcessing = this.listing?.payment_status === 'processing'
return /* html */`
${paymentProcessing ? `
<div class="sidebar-card payment-processing-card">
<div class="processing-badge">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
<strong>${t('payment.awaitingConfirmation')}</strong>
</div>
<p class="processing-hint">${t('payment.awaitingHint')}</p>
</div>
` : ''}
<div class="sidebar-card">
<a href="#/edit/${this.listingId}" class="btn btn-primary btn-lg sidebar-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
@@ -986,6 +1000,26 @@ style.textContent = /* css */`
text-align: center;
}
/* Payment Processing Badge */
page-listing .payment-processing-card {
background: var(--color-bg-secondary);
border: 1px solid var(--color-warning, #e6a700);
}
page-listing .processing-badge {
display: flex;
align-items: center;
gap: var(--space-sm);
color: var(--color-warning, #e6a700);
}
page-listing .processing-hint {
font-size: var(--font-size-sm);
color: var(--color-text-muted);
margin-top: var(--space-sm);
line-height: 1.5;
}
/* Loading & Empty States */
page-listing .loading {
display: flex;