Changeset 78b6d8a in Klonkt for src/views/pages


Ignore:
Timestamp:
06/26/2026 12:16:33 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
4c47eff
Parents:
3384e95
Message:

feat(tijdlijn): unboost button — retract a boost (Undo Announce) from posts

The 🔁 on a timeline post is now a toggle: not boosted -> boost (Announce + mark
locally); boosted -> unboost (highlighted) which sends Undo(Announce) so followers'
servers remove the reblog, and clears the local flag. sendInteraction handles
'unboost' (Undo wrapping Announce, matched on actor+object — no record of the
original Announce needed). All operator-driven: your click sends it, nothing
automatic touches the fediverse.

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

File:
1 edited

Legend:

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

    r3384e95 r78b6d8a  
    2525            <div class="tl-actions">
    2626              <form method="post" action="/tijdlijn/like" class="tl-act-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" class="tl-act" title="<%= t('fedi.likes') %>">⭐</button></form>
     27              <% if (p.boosted) { %>
     28              <form method="post" action="/tijdlijn/unboost" class="tl-act-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" class="tl-act tl-act-on" title="<%= t('tl.unboost') %>">🔁</button></form>
     29              <% } else { %>
    2730              <form method="post" action="/tijdlijn/boost" class="tl-act-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" class="tl-act" title="<%= t('fedi.boosts') %>">🔁</button></form>
     31              <% } %>
    2832              <button type="button" class="tl-act fedi-remote-reply-btn" data-fedi-uri="<%= p.id %>" data-fedi-ph="<%= t('fedi.remote_ph') %>" title="<%= t('fedi.remote_reply') %>">↩</button>
    2933              <form method="post" action="/blokkeren/add" class="tl-act-form" onsubmit="return confirm('<%= t('tl.block') %>?');"><input type="hidden" name="target" value="<%= p.author_uri %>"><button type="submit" class="tl-act" title="<%= t('tl.block') %>">🚫</button></form>
     
    7074  .tl-act { background: none; border: 1px solid color-mix(in srgb, var(--ink, #000) 14%, transparent); border-radius: 999px; padding: .2rem .6rem; cursor: pointer; font-size: .9rem; color: var(--ink-soft, #888); }
    7175  .tl-act:hover { color: var(--ink, #000); border-color: color-mix(in srgb, var(--accent, #888) 50%, transparent); }
     76  .tl-act-on { color: var(--accent, #06c); border-color: color-mix(in srgb, var(--accent, #888) 60%, transparent); background: color-mix(in srgb, var(--accent, #888) 14%, transparent); }
    7277</style>
    7378
Note: See TracChangeset for help on using the changeset viewer.