Changeset f5c3870 in Klonkt for src/views


Ignore:
Timestamp:
06/24/2026 04:08:34 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
19a72df
Parents:
d0cab9d
Message:

feat(fediverse-client): block/defederate accounts & domains

Block an @handle or a whole domain (/blokkeren + 🚫 on timeline items): their
inbound activities are silently dropped (202) and their stored content is purged.
New ap_blocks table + isBlockedAny gate in the inbox. Top-bar bell now points to
the fediverse /meldingen (gated to site managers via canManageFedi) instead of the
dead native notifications.

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

Location:
src/views
Files:
1 added
3 edited

Legend:

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

    rd0cab9d rf5c3870  
    5959    <a href="/tijdlijn" class="btn">🌐 <%= t('tl.title') %></a>
    6060    <a href="/meldingen" class="btn">🔔 <%= t('notif.title') %></a>
     61    <a href="/blokkeren" class="btn">🚫 <%= t('blk.title') %></a>
    6162    <a href="/admin/updates" class="btn"><%= t('admin.b_updates') %></a>
    6263    <a href="/admin/handleiding" class="btn"><%= t('admin.b_help') %></a>
  • src/views/pages/timeline.ejs

    rd0cab9d rf5c3870  
    4949              <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>
    5050              <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>
     51              <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>
    5152            </div>
    5253          </div>
  • src/views/partials/topnav.ejs

    rd0cab9d rf5c3870  
    9999      <% } %>
    100100
    101       <% if (user) { %>
    102         <a class="nav-btn nav-notif" href="/notifications" aria-label="<%= t('nav.notifications') %>" title="<%= t('nav.notifications') %>"
    103            hx-get="/notifications?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/notifications" hx-indicator="#pcms-loading">
     101      <% if (user && typeof canManageFedi !== 'undefined' && canManageFedi) { %>
     102        <a class="nav-btn nav-notif" href="/meldingen" aria-label="<%= t('notif.title') %>" title="<%= t('notif.title') %>"
     103           hx-get="/meldingen?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/meldingen" hx-indicator="#pcms-loading">
    104104          <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
    105           <% if (typeof notifUnread !== 'undefined' && notifUnread > 0) { %><span class="notif-badge"><%= notifUnread > 9 ? '9+' : notifUnread %></span><% } %>
    106105        </a>
    107106      <% } %>
     
    139138                <span><%= t('nav.account') %></span>
    140139              </a>
    141               <a href="/notifications" role="menuitem" class="udi"
    142                  hx-get="/notifications?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
    143                  hx-push-url="/notifications" hx-indicator="#pcms-loading">
     140              <% if (typeof canManageFedi !== 'undefined' && canManageFedi) { %>
     141              <a href="/meldingen" role="menuitem" class="udi"
     142                 hx-get="/meldingen?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
     143                 hx-push-url="/meldingen" hx-indicator="#pcms-loading">
    144144                <svg class="udi-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
    145                 <span><%= t('nav.notifications') %><% if (typeof notifUnread !== 'undefined' && notifUnread > 0) { %> (<%= notifUnread %>)<% } %></span>
     145                <span><%= t('notif.title') %></span>
    146146              </a>
     147              <% } %>
    147148              <a href="/favorieten" role="menuitem" class="udi"
    148149                 hx-get="/favorieten?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
Note: See TracChangeset for help on using the changeset viewer.