Changeset 34e63f0 in Klonkt
- Timestamp:
- 08/08/2026 05:30:13 AM (5 weeks ago)
- Branches:
- main
- Children:
- 4d81de5
- Parents:
- ffb371c
- git-author:
- Robin <roboburr@…> (08/08/2026 05:30:12 AM)
- git-committer:
- roboburr <roboburr@…> (08/08/2026 05:30:13 AM)
- Location:
- src
- Files:
-
- 4 edited
-
middleware/site.js (modified) (2 diffs)
-
views/pages/authorize-interaction.ejs (modified) (2 diffs)
-
views/partials/fedi-node.ejs (modified) (2 diffs)
-
views/partials/msg-item.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/middleware/site.js
rffb371c r34e63f0 12 12 import { audioUrl } from '../services/AudioStreamService.js'; 13 13 import { audioEnabled } from '../config/features.js'; 14 import * as Guardianship from '../services/guardianship/index.js'; 14 15 15 16 /** … … 33 34 res.locals.site = defaultSite; 34 35 res.locals.siteUrlBase = ''; 36 // Mag deze account antwoorden (shaer-r4c)? Eén keer hier, zodat de 37 // antwoordvelden in de views hem kunnen lezen zonder dat elke route hem 38 // apart doorgeeft. De server weigert het antwoord toch al in deliverReply; 39 // dit voorkomt alleen dat een kind tegen een deur duwt die op slot zit. 40 try { 41 const isWard = Guardianship.listGuardians(defaultSite.slug).length > 0; 42 res.locals.mayReply = Guardianship.wardGateAllowed(defaultSite.gate_replies, isWard); 43 } catch { res.locals.mayReply = true; } 35 44 } 36 45 -
src/views/pages/authorize-interaction.ejs
rffb371c r34e63f0 174 174 </form> 175 175 </div> 176 <% if (locals.mayReply !== false) { %> 176 177 <p class="auth-interact-or"><%= t('fedi.or_reply') %></p> 177 178 <p class="auth-interact-where">💬 <%= t('fedi.reply_where') %></p> … … 191 192 <div class="auth-interact-actions"><a href="<%= uri %>" class="btn"><%= t('comments.cancel') %></a></div> 192 193 </div> 194 <% } %> 193 195 <p class="auth-interact-note"><%= t('fedi.remote_as', { site: siteTitle }) %></p> 194 196 <details class="auth-report"> -
src/views/partials/fedi-node.ejs
rffb371c r34e63f0 46 46 <button type="submit" class="fedi-cact fedi-cact-boost<%= n.acted_boost ? ' is-on' : '' %>" title="<%= n.acted_boost ? t('tl.unboost') : t('fedi.boost_short') %>" aria-label="<%= n.acted_boost ? t('tl.unboost') : t('fedi.boost_short') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg></button> 47 47 </form> 48 <% if (locals.mayReply !== false) { %> 48 49 <details class="fedi-owner-reply"> 49 50 <summary class="fedi-cact fedi-cact-reply" title="<%= t('fedi.remote_reply_short') %>" aria-label="<%= t('fedi.remote_reply_short') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 17 4 12 9 7"/><path d="M20 18v-2a4 4 0 0 0-4-4H4"/></svg></summary> … … 57 58 }) %> 58 59 </details> 60 <% } %> 59 61 <%# Owner moderation: report to their instance + remove (tombstoned: never comes back via re-delivery or thread-crawl). %> 60 62 <form method="post" action="<%= _base %>/interactions/<%= n.id %>/report" class="fedi-owner-react" data-confirm="<%= t('fedi.mod_report_confirm') %>"> -
src/views/partials/msg-item.ejs
rffb371c r34e63f0 48 48 draad aan een post krijgt een reply, een draad aan een persoon een 49 49 direct bericht. %> 50 <% var _rt = n.replyTo || {}; var _kan = canMutate && ((_rt.interactionId && _rt.postSlug) || _rt.actorUri); %> 50 <%# shaer-r4c: precies de tak die de server ook kiest. /messages/reply 51 gaat naar deliverReply als er een interaction+post is (dat is een 52 ANTWOORD en valt onder de poort), en anders naar deliverDirectNote 53 (dat is een bericht, andere poort). Alleen de eerste verbergen. %> 54 <% var _rt = n.replyTo || {}; var _thread = _rt.interactionId && _rt.postSlug; %> 55 <% var _kan = canMutate && ((_thread && locals.mayReply !== false) || (!_thread && _rt.actorUri)); %> 51 56 <% if (_kan) { %> 52 57 <div class="msg-thread-foot">
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)