Changeset e91849c in Klonkt for src/views/partials/fedi-node.ejs
- Timestamp:
- 06/25/2026 10:21:29 PM (3 months ago)
- Branches:
- main
- Children:
- 67fe576
- Parents:
- 2902320
- File:
-
- 1 edited
-
src/views/partials/fedi-node.ejs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/partials/fedi-node.ejs
r2902320 re91849c 1 <%# Renders one fediverse thread node (n). Expects: n, t, canManageSite, _base, siteAvatar, formatDateTime %>1 <%# Renders one fediverse thread node (n). Expects: n, t, canManageSite, _base, siteAvatar, formatDateTime, postSlug %> 2 2 <div class="comment-avatar"> 3 3 <% if (n.actor_icon) { %><img src="<%= n.actor_icon %>" alt="" loading="lazy"> … … 17 17 <button type="submit" class="comment-delete-btn"><%= t('comments.delete') %></button> 18 18 </form> 19 <% } else if (!n.mine && typeof canManageSite !== 'undefined' && canManageSite && n.id && typeof postSlug !== 'undefined' && postSlug) { %> 20 <%# Owner: reply directly AS the site — no "your server" detour (it's your own site). %> 21 <details class="fedi-owner-reply"> 22 <summary class="comment-reply-btn"> 23 <svg viewBox="0 0 24 24" width="13" height="13" 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> 24 <%= t('fedi.remote_reply_short') %> 25 </summary> 26 <form method="post" action="<%= _base %>/posts/<%= postSlug %>/fedi-reply" class="comment-reply-form"> 27 <input type="hidden" name="interaction_id" value="<%= n.id %>"> 28 <textarea name="text" rows="2" required placeholder="<%= t('fedi.reply_ph') %>"></textarea> 29 <div class="comment-reply-form-actions"> 30 <button type="submit" class="btn"><%= t('fedi.send') %></button> 31 </div> 32 </form> 33 </details> 19 34 <% } else if (!n.mine && n.noteId) { %> 20 35 <button type="button" class="comment-reply-btn fedi-remote-reply-btn" data-fedi-uri="<%= n.noteId %>" data-fedi-ph="<%= t('fedi.remote_ph') %>"> … … 27 42 <ol class="comment-replies"> 28 43 <% n.children.forEach(function(c){ %> 29 <li class="comment comment-reply"><%- include('../partials/fedi-node', { n: c, t: t, canManageSite: (typeof canManageSite !== 'undefined' ? canManageSite : false), _base: _base, siteAvatar: (typeof siteAvatar !== 'undefined' ? siteAvatar : null), formatDateTime: formatDateTime }) %></li>44 <li class="comment comment-reply"><%- include('../partials/fedi-node', { n: c, t: t, canManageSite: (typeof canManageSite !== 'undefined' ? canManageSite : false), _base: _base, siteAvatar: (typeof siteAvatar !== 'undefined' ? siteAvatar : null), formatDateTime: formatDateTime, postSlug: (typeof postSlug !== 'undefined' ? postSlug : null) }) %></li> 30 45 <% }); %> 31 46 </ol>
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)