Changeset 0fa59c3 in Klonkt for src/routes/posts.js
- Timestamp:
- 06/26/2026 03:56:42 PM (2 months ago)
- Branches:
- main
- Children:
- 84903a1
- Parents:
- cb3d5fc
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
rcb3d5fc r0fa59c3 85 85 'tag', 'type', 'user', 'users', 'artiesten', 'leden', 'favorieten', 'feed.xml', 'atom.xml', 'sitemap.xml', 86 86 'manifest.webmanifest', 'sw.js', 'favicon.ico', 'favicon.svg', 'assets', 87 'authorize_interaction', 'fediverse', ' timeline', 'following', 'notifications', 'blocking',87 'authorize_interaction', 'fediverse', 'newspaper', 'following', 'notifications', 'blocking', 88 88 ]); 89 89 … … 597 597 } 598 598 599 router.get('/ timeline', requireSiteManager, (req, res) => {599 router.get('/newspaper', requireSiteManager, (req, res) => { 600 600 const site = res.locals.site; 601 601 const timeline = (site ? ActivityPubService.getTimeline(site.slug, 60) : []) 602 602 .map((p) => ({ ...p, embedHtml: timelineEmbedHtml(p.content) })); 603 renderPage(req, res, 'pages/ timeline', {603 renderPage(req, res, 'pages/newspaper', { 604 604 pageTitle: 'Tijdlijn', bodyClass: 'on-special', 605 605 timeline, … … 619 619 }); 620 620 621 router.post('/ timeline/follow', requireSiteManager, async (req, res) => {621 router.post('/newspaper/follow', requireSiteManager, async (req, res) => { 622 622 const site = res.locals.site; 623 623 const handle = (req.body.handle || '').toString(); … … 635 635 }); 636 636 637 router.post('/ timeline/unfollow', requireSiteManager, async (req, res) => {637 router.post('/newspaper/unfollow', requireSiteManager, async (req, res) => { 638 638 const site = res.locals.site; 639 639 const actorUri = (req.body.actor_uri || '').toString(); … … 643 643 644 644 // Toggle "Featured" (show this account's posts in your Cirkel) on an account you follow. 645 router.post('/ timeline/autoboost', requireSiteManager, (req, res) => {645 router.post('/newspaper/autoboost', requireSiteManager, (req, res) => { 646 646 const site = res.locals.site; 647 647 const actorUri = (req.body.actor_uri || '').toString(); … … 650 650 }); 651 651 652 router.post('/ timeline/like', requireSiteManager, async (req, res) => {652 router.post('/newspaper/like', requireSiteManager, async (req, res) => { 653 653 const site = res.locals.site; 654 654 if (site) { try { await ActivityPubService.sendInteraction(site, 'like', (req.body.note || '').toString(), (req.body.author || '').toString()); } catch (e) { /* ignore */ } } 655 res.redirect('/ timeline?success=' + encodeURIComponent('Geliket ⭐'));656 }); 657 658 router.post('/ timeline/boost', requireSiteManager, async (req, res) => {655 res.redirect('/newspaper?success=' + encodeURIComponent('Geliket ⭐')); 656 }); 657 658 router.post('/newspaper/boost', requireSiteManager, async (req, res) => { 659 659 const site = res.locals.site; 660 660 const note = (req.body.note || '').toString(); … … 663 663 ActivityPubService.markBoosted(site.slug, note); // also surface it in the Cirkel (mixed by date) 664 664 } 665 res.redirect('/ timeline?success=' + encodeURIComponent('Geboost 🔁'));665 res.redirect('/newspaper?success=' + encodeURIComponent('Geboost 🔁')); 666 666 }); 667 667 668 668 // Unboost (retract): send Undo(Announce) + clear the local flag. 669 router.post('/ timeline/unboost', requireSiteManager, async (req, res) => {669 router.post('/newspaper/unboost', requireSiteManager, async (req, res) => { 670 670 const site = res.locals.site; 671 671 const note = (req.body.note || '').toString(); … … 674 674 ActivityPubService.unmarkBoosted(site.slug, note); 675 675 } 676 res.redirect('/ timeline?success=' + encodeURIComponent('Boost ingetrokken'));676 res.redirect('/newspaper?success=' + encodeURIComponent('Boost ingetrokken')); 677 677 }); 678 678 … … 705 705 } 706 706 const ref = req.get('Referer') || ''; 707 res.redirect((ref.includes('/ timeline') ? '/timeline?' : '/blocking?') + q);707 res.redirect((ref.includes('/newspaper') ? '/newspaper?' : '/blocking?') + q); 708 708 }); 709 709
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)