Changeset 46f3dd6 in Klonkt for src/views


Ignore:
Timestamp:
06/26/2026 09:05:28 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
8ef8c3e
Parents:
2c22bb5
Message:

feat(fediverse): split Tijdlijn (feed) from Volgend (following) + put Timeline in the menu

Phase 3 of the Cirkels-on-AP rework. /tijdlijn is now just the reading feed;
following management (follow box, follow list, auto-boost toggles) moves to a new
/volgend page. A shared tab nav switches between them. Timeline gets a top-bar
button next to the bell on desktop and a Tijdlijn entry in the mobile profile
sheet (both admin-only via canManageFedi). follow/unfollow/autoboost now redirect
to /volgend. nl/en/de.

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

Location:
src/views
Files:
2 added
3 edited

Legend:

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

    r2c22bb5 r46f3dd6  
    22  <h1 class="tl-title"><%= t('tl.title') %></h1>
    33  <p class="tl-lead"><%= t('tl.lead') %></p>
     4  <%- include('../partials/tl-tabs', { active: 'feed' }) %>
    45  <% if (typeof success !== 'undefined' && success) { %><div class="alert alert-success"><%= success %></div><% } %>
    56  <% if (typeof error !== 'undefined' && error) { %><div class="alert alert-error"><%= error %></div><% } %>
    67
    7   <form method="post" action="/tijdlijn/follow" class="tl-follow">
    8     <input type="text" name="handle" placeholder="@naam@server.social" autocomplete="off" spellcheck="false" required>
    9     <button type="submit" class="btn btn-primary"><%= t('tl.follow_btn') %></button>
    10     <label class="tl-follow-ab" title="<%= t('tl.autoboost_hint') %>"><input type="checkbox" name="auto_boost" value="1"> 🔁 <%= t('tl.autoboost_follow') %></label>
    11   </form>
    12 
    13   <% if (following && following.length) { %>
    14     <h2 class="tl-sub"><%= t('tl.following') %> (<%= following.length %>)</h2>
    15     <ul class="tl-foll-list">
    16       <% following.forEach(function(f){ %>
    17         <li class="tl-foll">
    18           <span class="tl-foll-av"><% if (f.icon) { %><img src="<%= f.icon %>" alt=""><% } else { %><%= (f.name || '?').charAt(0).toUpperCase() %><% } %></span>
    19           <span class="tl-foll-meta">
    20             <a href="<%= f.url || f.actor_uri %>" target="_blank" rel="nofollow noopener"><%= f.name || f.handle %></a>
    21             <span class="tl-foll-handle"><%= f.handle %></span>
    22             <% if (f.status === 'pending') { %><span class="tl-pending"><%= t('tl.pending') %></span><% } %>
    23           </span>
    24           <form method="post" action="/tijdlijn/autoboost" class="tl-foll-ab" title="<%= t('tl.autoboost_hint') %>">
    25             <input type="hidden" name="actor_uri" value="<%= f.actor_uri %>">
    26             <label><input type="checkbox" name="auto_boost" value="1" <%= f.auto_boost ? 'checked' : '' %> onchange="this.form.submit()"> 🔁 <%= t('tl.autoboost') %></label>
    27           </form>
    28           <form method="post" action="/tijdlijn/unfollow"><input type="hidden" name="actor_uri" value="<%= f.actor_uri %>"><button type="submit" class="tl-unfollow"><%= t('tl.unfollow') %></button></form>
    29         </li>
    30       <% }); %>
    31     </ul>
    32   <% } %>
    33 
    34   <h2 class="tl-sub"><%= t('tl.feed') %></h2>
    358  <% if (!timeline || !timeline.length) { %>
    369    <p class="tl-empty"><%= t('tl.empty') %></p>
  • src/views/partials/profile-sheet.ejs

    r2c22bb5 r46f3dd6  
    6363        </a>
    6464      </li>
     65      <% if (typeof canManageFedi !== 'undefined' && canManageFedi) { %>
     66      <li role="none">
     67        <a href="/tijdlijn" class="profile-sheet-item" role="menuitem" data-close-sheet
     68           hx-get="/tijdlijn?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/tijdlijn" hx-indicator="#pcms-loading">
     69          <svg class="psi-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>
     70          <span class="psi-label"><%= t('tl.title') %></span>
     71          <svg class="psi-chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 18 15 12 9 6"/></svg>
     72        </a>
     73      </li>
     74      <% } %>
    6575      <% if (typeof canSeeBeheer !== 'undefined' && canSeeBeheer) { %>
    6676      <li role="none">
  • src/views/partials/topnav.ejs

    r2c22bb5 r46f3dd6  
    9797          </div>
    9898        </details>
     99      <% } %>
     100
     101      <% if (user && typeof canManageFedi !== 'undefined' && canManageFedi) { %>
     102        <a class="nav-btn" href="/tijdlijn" aria-label="<%= t('tl.title') %>" title="<%= t('tl.title') %>"
     103           hx-get="/tijdlijn?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/tijdlijn" hx-indicator="#pcms-loading">
     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"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>
     105        </a>
    99106      <% } %>
    100107
Note: See TracChangeset for help on using the changeset viewer.