Changeset 46f3dd6 in Klonkt for src/routes


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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r2c22bb5 r46f3dd6  
    563563router.get('/tijdlijn', requireSiteManager, (req, res) => {
    564564  const site = res.locals.site;
    565   const following = site ? ActivityPubService.listFollowing(site.slug) : [];
    566565  const timeline = site ? ActivityPubService.getTimeline(site.slug, 60) : [];
    567566  renderPage(req, res, 'pages/timeline', {
    568567    pageTitle: 'Tijdlijn', bodyClass: 'on-special',
    569     following, timeline,
     568    timeline,
     569    success: req.query.success || null, error: req.query.error || null,
     570  });
     571});
     572
     573// Volgend — manage the accounts you follow (+ per-account auto-boost toggles).
     574router.get('/volgend', requireSiteManager, (req, res) => {
     575  const site = res.locals.site;
     576  const following = site ? ActivityPubService.listFollowing(site.slug) : [];
     577  renderPage(req, res, 'pages/volgend', {
     578    pageTitle: 'Volgend', bodyClass: 'on-special',
     579    following,
    570580    success: req.query.success || null, error: req.query.error || null,
    571581  });
     
    583593    } catch (e) { q = 'error=' + encodeURIComponent('Volgen mislukt'); }
    584594  }
    585   res.redirect('/tijdlijn?' + q);
     595  res.redirect('/volgend?' + q);
    586596});
    587597
     
    590600  const actorUri = (req.body.actor_uri || '').toString();
    591601  if (site && actorUri) { try { await ActivityPubService.unfollowActor(site, actorUri); } catch (e) { /* ignore */ } }
    592   res.redirect('/tijdlijn?success=' + encodeURIComponent('Ontvolgd'));
     602  res.redirect('/volgend?success=' + encodeURIComponent('Ontvolgd'));
    593603});
    594604
     
    598608  const actorUri = (req.body.actor_uri || '').toString();
    599609  if (site && actorUri) ActivityPubService.setAutoBoost(site.slug, actorUri, !!req.body.auto_boost);
    600   res.redirect('/tijdlijn?success=' + encodeURIComponent(req.body.auto_boost ? 'Auto-boost aan 🔁' : 'Auto-boost uit'));
     610  res.redirect('/volgend?success=' + encodeURIComponent(req.body.auto_boost ? 'Auto-boost aan 🔁' : 'Auto-boost uit'));
    601611});
    602612
Note: See TracChangeset for help on using the changeset viewer.