fix: reply buttons hidden + missing webmentions on pages without build-time data

Two bugs fixed:

1. Reply buttons stayed hidden despite owner being detected. The
   alpine:initialized event fires before the async checkOwner() fetch
   resolves, so isOwner was always false when the handler ran. Fix:
   dispatch custom owner:detected event from init() after both owner
   check and owner replies are loaded.

2. Client-side webmentions not rendering on pages with zero build-time
   webmentions. createWebmentionsSection() looked for .webmention-form
   but the <details> element lacked that class, so the insertion point
   was never found. Fix: add webmention-form class to the details element.

Confab-Link: http://localhost:8080/sessions/184584f4-67e1-485a-aba8-02ac34a600fe
This commit is contained in:
Ricardo
2026-03-14 19:19:11 +01:00
parent 58e3695d68
commit a9b4300d7b
3 changed files with 9 additions and 3 deletions

View File

@@ -192,7 +192,7 @@
{% endif %}
{# Webmention send form — collapsed by default #}
<details class="mt-8">
<details class="webmention-form mt-8">
<summary class="text-sm font-semibold text-surface-600 dark:text-surface-400 cursor-pointer hover:text-surface-700 dark:hover:text-surface-300 transition-colors list-none [&::-webkit-details-marker]:hidden flex items-center gap-1.5">
<svg class="w-3.5 h-3.5 transition-transform [[open]>&]:rotate-90" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>