Changeset 31680c3 in Klonkt for src/views


Ignore:
Timestamp:
09/30/2026 08:39:24 AM (6 hours ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
746d98a
Parents:
76bd53c
Message:

[Add to HUB] on the Connect page — the click is the owner's yes

Putting a klonkt on the Klonkt Hub means the hub sends a Follow. With the
owner gate on (the default) that Follow then waits for the owner — the same
person who just asked for it. Without this they would sign up on the hub and
then have to approve their own sign-up on /connect.

The button POSTs to /connect/add-to-hub, which records a one-day invitation
and redirects to the hub's sign-up form with the site's handle filled in
(?add=). A Follow from the hub's host, signed by the hub itself, passes the
owner gate while that invitation holds. It is not used up on the first
Follow: a hub that re-sends after a timeout would otherwise land in the queue
for something already decided.

Narrow on purpose: only the hub's host, only signed by it, only for a day.
Anyone else still waits for the owner, and a WARD's guardians still decide —
their gate sits before this one and this path never reaches it.

If a request from the hub is already waiting (someone signed the klonkt up
earlier), the click is exactly the yes it waits for: it is accepted on the
spot and the button goes to the channel on the hub instead of the form. Once
the hub follows, /connect shows a confirmation instead of the button. Hidden
after a move, where the outgoing side is locked.

KLONKT_HUB_URL lets a self-hoster point the button at another hub; default
​https://hub.klonkt.com.

Co-Authored-By: Claude Opus 5.5 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/connect.ejs

    r76bd53c r31680c3  
    5050      stond hij bovendien zonder enige opmaak: labels als losse tekst naast hun
    5151      invoerveld. Op die pagina erft hij de kaartopmaak. %>
     52
     53  <%# [Add to HUB] (Robin, 30-9): je klonkt op de Klonkt Hub zetten. De knop
     54      gaat naar het aanmeldformulier van de hub, vooraf ingevuld, en keurt de
     55      Follow die daarop volgt hier alvast goed -- anders moest je straks je
     56      eigen aanmelding nog accepteren. Een nieuw tabblad, zodat deze pagina
     57      blijft staan. Staat hij er al op, dan een bevestiging in plaats van de knop. %>
     58  <% if (typeof hub !== 'undefined' && hub && !(typeof movedTo !== 'undefined' && movedTo)) { %>
     59    <section class="conn-hub">
     60      <h2 class="conn-h"><%= t('tl.hub_title') %></h2>
     61      <% if (hub.onHub) { %>
     62        <p class="conn-unreach-lead">&#10003; <%= t('tl.hub_on') %> <a href="<%= hub.url %>" target="_blank" rel="noopener"><%= t('tl.hub_open') %></a></p>
     63      <% } else { %>
     64        <p class="conn-unreach-lead"><%= t('tl.hub_lead') %></p>
     65        <% if (hub.ward) { %><p class="conn-unreach-lead"><%= t('tl.hub_ward') %></p><% } %>
     66        <form method="post" action="/connect/add-to-hub" target="_blank">
     67          <button type="submit" class="btn btn-primary"><%= t('tl.hub_add') %></button>
     68        </form>
     69      <% } %>
     70    </section>
     71  <% } %>
    5272
    5373  <%# De eigenaarspoort (Robins wens, 18-8): volgverzoeken die wachten op
Note: See TracChangeset for help on using the changeset viewer.