Changeset 283f618 in Klonkt for src/views/pages


Ignore:
Timestamp:
06/26/2026 07:26:26 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
f278df9
Parents:
eb2fe08
Message:

feat(fediverse): add an ActivityPub on/off toggle (off = no federation, no comments)

A solo site can now run without the fediverse. ap_enabled (default on, Beheer ->
Instellingen). When off: /ap/*, WebFinger and NodeInfo 404 (undiscoverable), the
'from the fediverse' reactions section is hidden on posts (= no comments, since
native comments were removed), the profile follow button and the fediverse admin
links disappear. Cirkels is separate (not gated here).

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

Location:
src/views/pages
Files:
3 edited

Legend:

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

    reb2fe08 r283f618  
    117117  </section>
    118118  <% } %>
     119
     120  <%# Fediverse (ActivityPub) on/off. Off = no federation + no fediverse reactions,
     121      which (since native comments were removed) means no comments at all. %>
     122  <section class="set-card" style="margin-top:1rem">
     123    <h2><%= t('aset.fediverse') %></h2>
     124    <p class="set-help"><%= t('aset.fediverse_help') %></p>
     125    <form method="post" action="/admin/settings/ap" class="set-form">
     126      <label class="set-toggle" style="display:flex;align-items:center;gap:.6rem;cursor:pointer">
     127        <input type="checkbox" name="ap_enabled" value="1" <%= (typeof apEnabledSetting === 'undefined' || apEnabledSetting) ? 'checked' : '' %>>
     128        <span><%= t('aset.fediverse_toggle') %></span>
     129      </label>
     130      <div class="set-actions"><button type="submit" class="btn btn-primary"><%= t('aset.save') %></button></div>
     131    </form>
     132  </section>
    119133
    120134  <%# E-mail / SMTP — required for sending newsletters, notify-mails and password resets. %>
  • src/views/pages/admin.ejs

    reb2fe08 r283f618  
    5757      <a href="/admin/shows" class="btn"><%= t('admin.b_agenda') %></a>
    5858    <% } %>
    59     <a href="/tijdlijn" class="btn">🌐 <%= t('tl.title') %></a>
    60     <a href="/meldingen" class="btn">🔔 <%= t('notif.title') %></a>
    61     <a href="/fediverse" class="btn">🐘 <%= t('admin.b_fediverse') %></a>
    62     <a href="/blokkeren" class="btn">🚫 <%= t('blk.title') %></a>
     59    <% if (typeof apEnabled === 'undefined' || apEnabled) { %>
     60      <a href="/tijdlijn" class="btn">🌐 <%= t('tl.title') %></a>
     61      <a href="/meldingen" class="btn">🔔 <%= t('notif.title') %></a>
     62      <a href="/fediverse" class="btn">🐘 <%= t('admin.b_fediverse') %></a>
     63      <a href="/blokkeren" class="btn">🚫 <%= t('blk.title') %></a>
     64    <% } %>
    6365    <a href="/admin/updates" class="btn"><%= t('admin.b_updates') %></a>
    6466    <a href="/admin/handleiding" class="btn"><%= t('admin.b_help') %></a>
  • src/views/pages/post.ejs

    reb2fe08 r283f618  
    7070  <% var _postAbsUrl = (typeof ogOrigin !== 'undefined' && ogOrigin ? ogOrigin : '') + (typeof _base !== 'undefined' && _base ? _base : '') + '/' + post.slug; %>
    7171  <% var _fedi = (typeof fediverse !== 'undefined' && fediverse) ? fediverse : { thread: [], likeCount: 0, announceCount: 0 }; %>
    72   <% if (post.status === 'published') { %>
     72  <% if (post.status === 'published' && (typeof apEnabled === 'undefined' || apEnabled)) { %>
    7373    <section class="post-fediverse post-comments" id="fediverse">
    7474      <h2 class="comments-heading"><%= t('fedi.heading') %></h2>
Note: See TracChangeset for help on using the changeset viewer.