Ignore:
Timestamp:
06/26/2026 01:13:21 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
54d2f98
Parents:
c7c7f02
Message:

feat(fedi): like/boost/reply on the interaction page + display-only stats

  • Post 'From the fediverse' stats (like/boost/reply) are now display-only counters (the star is no longer a button). One CTA, renamed 'Interact via the fediverse'.
  • The /authorize_interaction page now offers Like AND Boost (next to reply), via a new POST /authorize_interaction/boost (Undo-able later; markBoosted so it shows in the Cirkel if it's in your timeline).
  • The 'view the full post + replies on the source' link is now a prominent button.
  • i18n nl/en/de: fedi.boost_btn, fedi.boosted_title/_done, fedi.remote_interact.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/authorize-interaction.ejs

    rc7c7f02 rb6cdc3d  
    2323    <h1 class="auth-interact-title">★ <%= t('fedi.liked_title') %></h1>
    2424    <p class="auth-interact-note"><%= t('fedi.liked_done') %></p>
     25    <p class="auth-interact-actions">
     26      <% if (uri) { %><a class="btn" href="<%= uri %>" rel="nofollow noopener"><%= t('fedi.remote_view_original') %></a><% } %>
     27      <a class="btn btn-primary" href="/"><%= t('fedi.remote_back') %></a>
     28    </p>
     29  <% } else if (typeof boosted !== 'undefined' && boosted) { %>
     30    <h1 class="auth-interact-title">🔁 <%= t('fedi.boosted_title') %></h1>
     31    <p class="auth-interact-note"><%= t('fedi.boosted_done') %></p>
    2532    <p class="auth-interact-actions">
    2633      <% if (uri) { %><a class="btn" href="<%= uri %>" rel="nofollow noopener"><%= t('fedi.remote_view_original') %></a><% } %>
     
    7784        <img class="auth-interact-img" src="<%= im %>" alt="" loading="lazy">
    7885      <% }); %>
    79       <% if (target.url || uri) { %>
    80         <p class="auth-interact-orig"><a href="<%= target.url || uri %>" target="_blank" rel="nofollow noopener"><%= t('fedi.remote_view_original') %></a></p>
    81       <% } %>
    8286    </blockquote>
    83     <form method="post" action="/authorize_interaction/like" class="auth-interact-like">
    84       <input type="hidden" name="uri" value="<%= uri %>">
    85       <button type="submit" class="btn btn-primary auth-like-btn">★ <%= t('fedi.like_btn') %></button>
    86     </form>
     87    <% if (target.url || uri) { %>
     88      <a class="auth-view-src" href="<%= target.url || uri %>" target="_blank" rel="nofollow noopener">
     89        <svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 17 17 7"/><path d="M7 7h10v10"/></svg>
     90        <span><%= t('fedi.remote_view_original') %></span>
     91      </a>
     92    <% } %>
     93    <div class="auth-interact-react">
     94      <form method="post" action="/authorize_interaction/like">
     95        <input type="hidden" name="uri" value="<%= uri %>">
     96        <button type="submit" class="btn btn-primary auth-like-btn">★ <%= t('fedi.like_btn') %></button>
     97      </form>
     98      <form method="post" action="/authorize_interaction/boost">
     99        <input type="hidden" name="uri" value="<%= uri %>">
     100        <button type="submit" class="btn auth-boost-btn">🔁 <%= t('fedi.boost_btn') %></button>
     101      </form>
     102    </div>
    87103    <p class="auth-interact-or"><%= t('fedi.or_reply') %></p>
    88104    <p class="auth-interact-where">💬 <%= t('fedi.reply_where') %></p>
     
    124140  .auth-interact-orig { margin: .75rem 0 0; font-size: .85rem; }
    125141  .auth-interact-orig a { color: var(--accent, #06c); }
     142  .auth-view-src { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.1rem; padding: .6rem 1rem;
     143    border: 1px solid color-mix(in srgb, var(--accent, #888) 45%, transparent); border-radius: 12px;
     144    background: color-mix(in srgb, var(--accent, #888) 10%, transparent); color: var(--accent, #06c);
     145    text-decoration: none; font-weight: 600; font-size: .92rem; transition: background .15s, border-color .15s; }
     146  .auth-view-src:hover { background: color-mix(in srgb, var(--accent, #888) 18%, transparent); border-color: var(--accent, #888); }
     147  .auth-interact-react { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 .25rem; }
     148  .auth-interact-react form { margin: 0; }
     149  .auth-boost-btn { white-space: nowrap; }
    126150  .fedi-manage { list-style: none; padding: 0; margin: 1.25rem 0 1rem; display: flex; flex-direction: column; gap: .7rem; }
    127151  .fedi-manage-item { padding: .85rem 1rem; border-radius: 14px; background: color-mix(in srgb, var(--ink, #000) 4%, transparent); border: 1px solid color-mix(in srgb, var(--ink, #000) 9%, transparent); }
Note: See TracChangeset for help on using the changeset viewer.