Changeset 67fe576 in Klonkt for src/views


Ignore:
Timestamp:
06/25/2026 10:25:57 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
6cabd18
Parents:
e91849c
Message:

ux(fedi): owner can like/boost a fediverse comment directly too

Extends the owner-direct treatment to likes and boosts: under an inbound
fediverse comment the site owner now gets a star + boost button that go straight
through /posts/:slug/fedi-react (sendInteraction as the site), alongside the
direct reply. No 'your server' detour. Visitors are unchanged.

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

Location:
src/views
Files:
2 edited

Legend:

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

    re91849c r67fe576  
    303303  gap: 0.5rem;
    304304  margin-top: 0.4rem;
    305 }
     305  flex-wrap: wrap;
     306  align-items: center;
     307}
     308.fedi-owner-react { display: inline; }
     309.fedi-owner-reply { display: inline-block; }
     310.fedi-owner-reply[open] { flex-basis: 100%; }
    306311.comment-reply-btn, .comment-delete-btn {
    307312  background: none;
  • src/views/partials/fedi-node.ejs

    re91849c r67fe576  
    1818      </form>
    1919    <% } 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). %>
     20      <%# Owner: like / boost / reply directly AS the site — no "your server" detour (it's your own site). %>
     21      <form method="post" action="<%= _base %>/posts/<%= postSlug %>/fedi-react" class="fedi-owner-react">
     22        <input type="hidden" name="interaction_id" value="<%= n.id %>">
     23        <input type="hidden" name="kind" value="like">
     24        <button type="submit" class="comment-reply-btn">⭐ <%= t('fedi.like_short') %></button>
     25      </form>
     26      <form method="post" action="<%= _base %>/posts/<%= postSlug %>/fedi-react" class="fedi-owner-react">
     27        <input type="hidden" name="interaction_id" value="<%= n.id %>">
     28        <input type="hidden" name="kind" value="boost">
     29        <button type="submit" class="comment-reply-btn">🔁 <%= t('fedi.boost_short') %></button>
     30      </form>
    2131      <details class="fedi-owner-reply">
    2232        <summary class="comment-reply-btn">
Note: See TracChangeset for help on using the changeset viewer.