Changeset 8f2f97c in Klonkt for src/views


Ignore:
Timestamp:
06/23/2026 02:24:46 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
cb01666
Parents:
24cdcc6
Message:

Prutter (DM feature) fully removed

Reason: redundant feature + unnecessary attack surface (real-time WebSocket +
storing private messages = privacy/abuse risk). Removed: routes/prutter.js,
PrutterService, the WebSocket server in server.js, both DM views, all nav links
(topnav/bottom-tab), the DM button on profiles, the per-site enable_prutter
toggle and column. Existing (empty) DM tables in old DBs remain untouched but
are no longer referenced anywhere. No WebSocket left in the app.

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

Location:
src/views
Files:
2 deleted
5 edited

Legend:

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

    r24cdcc6 r8f2f97c  
    163163        <span><%= t('asite.enable_audio') %></span>
    164164      </label>
    165       <%# Prutter is een Hub-only premium-functie — toggle alleen tonen in Hub-modus. %>
    166       <% if (typeof tenancy !== 'undefined' && tenancy === 'hub') { %>
    167       <label class="cb">
    168         <input type="checkbox" name="enable_prutter" value="1" <%= site.enable_prutter ? 'checked' : '' %>>
    169         <span><%= t('asite.enable_prutter') %> <small class="form-hint-inline"><%= t('asite.enable_prutter_hint') %></small></span>
    170       </label>
    171       <% } %>
    172165    </fieldset>
    173166
  • src/views/pages/user.ejs

    r24cdcc6 r8f2f97c  
    2727        <% } %>
    2828      </p>
    29       <% if (user && user.id !== author.id && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub') && (typeof premiumUnlocked === 'undefined' || premiumUnlocked)) { %>
    30         <p class="user-actions">
    31           <a href="<%= siteUrlBase %>/prutter/new?to=<%= encodeURIComponent(author.username) %>" class="btn btn-primary">💬 <%= t('pusr.send_dm') %></a>
    32         </p>
    33       <% } %>
    3429    </div>
    3530  </header>
  • src/views/partials/bottom-tab.ejs

    r24cdcc6 r8f2f97c  
    1313const _canPost     = !!(user && (typeof canMutate === 'undefined' || canMutate)
    1414                        && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site));
    15 const _hasPrutter  = !!(user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub') && (typeof premiumUnlocked === 'undefined' || premiumUnlocked));
    1615const _ownProfile  = user ? ('/users/' + user.username) : null;
    1716const _isHub       = (typeof tenancy !== 'undefined' && tenancy === 'hub');
     
    3231else if (_p.indexOf('/search') === 0 || _p.indexOf('/tag/') === 0 || _p.indexOf('/type/') === 0) _active = 'search';
    3332else if (_p === '/posts/new' || /^\/posts\/[^/]+\/edit$/.test(_p)) _active = 'create';
    34 else if (_p.indexOf('/prutter') === 0) _active = 'prutter';
    3533else if (_p.indexOf('/account') === 0 || (_ownProfile && _p.indexOf(_ownProfile) === 0)) _active = 'profile';
    3634else if (_p.indexOf('/auth/login') === 0) _active = 'login';
     
    8078  <% } %>
    8179
    82   <!-- Prutter (DMs) -->
    83   <% if (_hasPrutter) { %>
    84     <a class="bottom-tab-item<%= _active === 'prutter' ? ' is-active' : '' %>"
    85        href="<%= _siteUrlBase %>/prutter"
    86        aria-label="Prutter berichten" <%= _active === 'prutter' ? 'aria-current="page"' : '' %>>
    87       <svg class="bottom-tab-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
    88         <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
    89       </svg>
    90       <span class="bottom-tab-label">Prutter</span>
    91       <% if (typeof unreadDmCount !== 'undefined' && unreadDmCount > 0) { %>
    92         <span class="bottom-tab-badge" aria-label="<%= unreadDmCount %> ongelezen"><%= unreadDmCount > 99 ? '99+' : unreadDmCount %></span>
    93       <% } %>
    94     </a>
    95   <% } %>
    9680
    9781  <!-- Profiel / Inloggen -->
  • src/views/partials/topnav.ejs

    r24cdcc6 r8f2f97c  
    1515const _isAdmin     = typeof bodyClass !== 'undefined' && bodyClass.indexOf('on-admin') >= 0;
    1616const _hasSearch   = !site || site.show_search === undefined || site.show_search;
    17 const _hasPrutter  = user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub') && (typeof premiumUnlocked === 'undefined' || premiumUnlocked);
    1817const _canPost     = user && (typeof canMutate === 'undefined' || canMutate)
    1918                     && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site);
     
    9897          </div>
    9998        </details>
    100       <% } %>
    101 
    102       <% if (_hasPrutter) { %>
    103         <a class="nav-btn" href="<%= _siteUrlBase %>/prutter" aria-label="Prutter (DMs)" title="Prutter">
    104           <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="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
    105         </a>
    10699      <% } %>
    107100
  • src/views/shell.ejs

    r24cdcc6 r8f2f97c  
    3333// Listing pages (search/tag/type/archive) shouldn't be indexed (dupe content)
    3434if (currentPath) {
    35   if (/^\/(?:search|tag|type|archive|users|prutter|account|admin)(?:$|\/)/.test(currentPath)) {
     35  if (/^\/(?:search|tag|type|archive|users|account|admin)(?:$|\/)/.test(currentPath)) {
    3636    _shouldIndex = false;
    3737  }
Note: See TracChangeset for help on using the changeset viewer.