Changeset eefd302 in Klonkt
- Timestamp:
- 06/26/2026 05:04:49 PM (2 months ago)
- Branches:
- main
- Children:
- cf4cf27
- Parents:
- 69e7a79
- Location:
- src
- Files:
-
- 7 edited
- 1 moved
-
routes/posts.js (modified) (10 diffs)
-
services/i18n.js (modified) (1 diff)
-
views/pages/admin.ejs (modified) (1 diff)
-
views/pages/following.ejs (modified) (2 diffs)
-
views/pages/news.ejs (moved) (moved from src/views/pages/newspaper.ejs ) (1 diff)
-
views/partials/fedi-tabs.ejs (modified) (1 diff)
-
views/partials/profile-sheet.ejs (modified) (1 diff)
-
views/partials/topnav.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
r69e7a79 reefd302 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', 'news paper', 'following', 'notifications', 'blocking',87 'authorize_interaction', 'fediverse', 'news', 'following', 'notifications', 'blocking', 88 88 ]); 89 89 … … 614 614 } 615 615 616 router.get('/news paper', requireSiteManager, (req, res) => {616 router.get('/news', requireSiteManager, (req, res) => { 617 617 const site = res.locals.site; 618 618 const cspOrigins = new Set(); … … 635 635 } 636 636 } 637 renderPage(req, res, 'pages/news paper', {638 pageTitle: 'News paper', bodyClass: 'on-special',637 renderPage(req, res, 'pages/news', { 638 pageTitle: 'News', bodyClass: 'on-special', 639 639 timeline, 640 640 success: req.query.success || null, error: req.query.error || null, … … 653 653 }); 654 654 655 router.post('/news paper/follow', requireSiteManager, async (req, res) => {655 router.post('/news/follow', requireSiteManager, async (req, res) => { 656 656 const site = res.locals.site; 657 657 const handle = (req.body.handle || '').toString(); … … 669 669 }); 670 670 671 router.post('/news paper/unfollow', requireSiteManager, async (req, res) => {671 router.post('/news/unfollow', requireSiteManager, async (req, res) => { 672 672 const site = res.locals.site; 673 673 const actorUri = (req.body.actor_uri || '').toString(); … … 677 677 678 678 // Toggle "Featured" (show this account's posts in your Cirkel) on an account you follow. 679 router.post('/news paper/autoboost', requireSiteManager, (req, res) => {679 router.post('/news/autoboost', requireSiteManager, (req, res) => { 680 680 const site = res.locals.site; 681 681 const actorUri = (req.body.actor_uri || '').toString(); … … 684 684 }); 685 685 686 router.post('/news paper/like', requireSiteManager, async (req, res) => {686 router.post('/news/like', requireSiteManager, async (req, res) => { 687 687 const site = res.locals.site; 688 688 if (site) { try { await ActivityPubService.sendInteraction(site, 'like', (req.body.note || '').toString(), (req.body.author || '').toString()); } catch (e) { /* ignore */ } } 689 res.redirect('/news paper?success=' + encodeURIComponent('Geliket β'));690 }); 691 692 router.post('/news paper/boost', requireSiteManager, async (req, res) => {689 res.redirect('/news?success=' + encodeURIComponent('Geliket β')); 690 }); 691 692 router.post('/news/boost', requireSiteManager, async (req, res) => { 693 693 const site = res.locals.site; 694 694 const note = (req.body.note || '').toString(); … … 697 697 ActivityPubService.markBoosted(site.slug, note); // also surface it in the Cirkel (mixed by date) 698 698 } 699 res.redirect('/news paper?success=' + encodeURIComponent('Geboost π'));699 res.redirect('/news?success=' + encodeURIComponent('Geboost π')); 700 700 }); 701 701 702 702 // Unboost (retract): send Undo(Announce) + clear the local flag. 703 router.post('/news paper/unboost', requireSiteManager, async (req, res) => {703 router.post('/news/unboost', requireSiteManager, async (req, res) => { 704 704 const site = res.locals.site; 705 705 const note = (req.body.note || '').toString(); … … 708 708 ActivityPubService.unmarkBoosted(site.slug, note); 709 709 } 710 res.redirect('/news paper?success=' + encodeURIComponent('Boost ingetrokken'));710 res.redirect('/news?success=' + encodeURIComponent('Boost ingetrokken')); 711 711 }); 712 712 … … 739 739 } 740 740 const ref = req.get('Referer') || ''; 741 res.redirect((ref.includes('/news paper') ? '/newspaper?' : '/blocking?') + q);741 res.redirect((ref.includes('/news') ? '/news?' : '/blocking?') + q); 742 742 }); 743 743 -
src/services/i18n.js
r69e7a79 reefd302 1123 1123 'fedi.heading': 'From the fediverse', 'fedi.likes': 'favourites', 'fedi.boosts': 'boosts', 'fedi.replies': 'Replies from the fediverse', 1124 1124 'fedi.reply': 'Reply', 'fedi.reply_ph': 'Your reply to the fediverseβ¦', 'fedi.send': 'Send', 'fedi.you': 'You', 1125 'fedi.remote_title': 'Reply via the fediverse', 'fedi.follow_heading': 'Follow via the fediverse', 'fedi.profile_follow': 'Follow via the fediverse', 'fedi.follow_intro': 'You are about to follow:', 'fedi.follow_btn': 'Follow', 'fedi.followed_title': 'Follow request sent β ', 'fedi.followed_done': 'Your follow request is on its way. Once accepted, their posts show up in your timeline.', 'fedi.view_profile': 'View profile β', 'fedi.remote_reply': 'Reply via the fediverse', 'fedi.remote_prompt': 'Your fediverse address (e.g. @you@mastodon.social):', 'fedi.remote_notfound': 'Could not fetch that post. Paste the full post URL:', 'fedi.remote_load': 'Fetch', 'fedi.remote_replying_to': 'Replying to', 'fedi.remote_as': 'Sent as {site}.', 'fedi.remote_view_original': 'View the full post + comments on the source β', 'fedi.remote_reply_short': 'via the fediverse', 'fedi.like_short': 'Like', 'fedi.boost_short': 'Boost', 'fedi.remote_ph': 'your server', 'fedi.remote_sent_title': 'Sent β ', 'fedi.remote_sent': 'Your reply has been sent. It will show up on the original post on the fediverse, not on this page. See it there:', 'fedi.reply_where': 'Your reply appears on the original post on the fediverse, not on this page. Use the link above to see it there.', 'fedi.remote_back': 'β Back to your site', 'fedi.like_btn': 'Like this post', 'fedi.or_reply': 'or reply:', 'fedi.liked_title': 'Liked', 'fedi.liked_done': 'Your like is on its way to the fediverse.', 'fedi.boost_btn': 'Boost this post', 'fedi.boosted_title': 'Boosted', 'fedi.boosted_done': 'Your boost is on its way to the fediverse.', 'fedi.remote_interact': 'Interact via the fediverse', 'fedi.delete_confirm': 'Delete this reply?', 'fedi.manage_title': 'My fediverse replies', 'fedi.manage_empty': 'You have not sent any replies yet.', 'tl.title': 'News paper', 'tl.lead': 'Follow accounts on the fediverse and see their posts here.', 'tl.follow_btn': 'Follow', 'tl.following': 'Following', 'tl.unfollow': 'Unfollow', 'tl.autoboost': 'Featured', 'tl.autoboost_follow': 'feature in circle', 'tl.autoboost_hint': 'Their new posts keep showing in your Circle (local, no fediverse boost).', 'tl.pending': 'pending', 'tl.unboost': 'Unboost', 'tl.feed': 'Posts', 'tl.tab_feed': 'Newspaper', 'tl.tab_following': 'Following', 'tl.tab_replies': 'Replies', 'tl.empty_following': 'You do not follow anyone yet.', 'tl.empty': 'Nothing yet β follow someone to see their posts here.', 'tl.view_original': 'View original β',1125 'fedi.remote_title': 'Reply via the fediverse', 'fedi.follow_heading': 'Follow via the fediverse', 'fedi.profile_follow': 'Follow via the fediverse', 'fedi.follow_intro': 'You are about to follow:', 'fedi.follow_btn': 'Follow', 'fedi.followed_title': 'Follow request sent β ', 'fedi.followed_done': 'Your follow request is on its way. Once accepted, their posts show up in your timeline.', 'fedi.view_profile': 'View profile β', 'fedi.remote_reply': 'Reply via the fediverse', 'fedi.remote_prompt': 'Your fediverse address (e.g. @you@mastodon.social):', 'fedi.remote_notfound': 'Could not fetch that post. Paste the full post URL:', 'fedi.remote_load': 'Fetch', 'fedi.remote_replying_to': 'Replying to', 'fedi.remote_as': 'Sent as {site}.', 'fedi.remote_view_original': 'View the full post + comments on the source β', 'fedi.remote_reply_short': 'via the fediverse', 'fedi.like_short': 'Like', 'fedi.boost_short': 'Boost', 'fedi.remote_ph': 'your server', 'fedi.remote_sent_title': 'Sent β ', 'fedi.remote_sent': 'Your reply has been sent. It will show up on the original post on the fediverse, not on this page. See it there:', 'fedi.reply_where': 'Your reply appears on the original post on the fediverse, not on this page. Use the link above to see it there.', 'fedi.remote_back': 'β Back to your site', 'fedi.like_btn': 'Like this post', 'fedi.or_reply': 'or reply:', 'fedi.liked_title': 'Liked', 'fedi.liked_done': 'Your like is on its way to the fediverse.', 'fedi.boost_btn': 'Boost this post', 'fedi.boosted_title': 'Boosted', 'fedi.boosted_done': 'Your boost is on its way to the fediverse.', 'fedi.remote_interact': 'Interact via the fediverse', 'fedi.delete_confirm': 'Delete this reply?', 'fedi.manage_title': 'My fediverse replies', 'fedi.manage_empty': 'You have not sent any replies yet.', 'tl.title': 'News', 'tl.lead': 'Follow accounts on the fediverse and see their posts here.', 'tl.follow_btn': 'Follow', 'tl.following': 'Following', 'tl.unfollow': 'Unfollow', 'tl.autoboost': 'Featured', 'tl.autoboost_follow': 'feature in circle', 'tl.autoboost_hint': 'Their new posts keep showing in your Circle (local, no fediverse boost).', 'tl.pending': 'pending', 'tl.unboost': 'Unboost', 'tl.feed': 'Posts', 'tl.tab_feed': 'News', 'tl.tab_following': 'Following', 'tl.tab_replies': 'Replies', 'tl.empty_following': 'You do not follow anyone yet.', 'tl.empty': 'Nothing yet β follow someone to see their posts here.', 'tl.view_original': 'View original β', 1126 1126 'comments.to_start': 'to start the conversation.', 1127 1127 'comments.reply': 'Reply', 'comments.delete': 'Delete', 'comments.cancel': 'Cancel', -
src/views/pages/admin.ejs
r69e7a79 reefd302 55 55 <% } %> 56 56 <% if (typeof apEnabled === 'undefined' || apEnabled) { %> 57 <a href="/news paper" class="btn">π <%= t('tl.title') %></a>57 <a href="/news" class="btn">π <%= t('tl.title') %></a> 58 58 <a href="/notifications" class="btn">π <%= t('notif.title') %></a> 59 59 <a href="/fediverse" class="btn">π <%= t('admin.b_fediverse') %></a> -
src/views/pages/following.ejs
r69e7a79 reefd302 9 9 </div> 10 10 11 <form method="post" action="/news paper/follow" class="tl-follow">11 <form method="post" action="/news/follow" class="tl-follow"> 12 12 <input type="text" name="handle" placeholder="@naam@server.social of site.com" autocomplete="off" spellcheck="false" required> 13 13 <button type="submit" class="btn btn-primary"><%= t('tl.follow_btn') %></button> … … 26 26 <% if (f.status === 'pending') { %><span class="tl-pending"><%= t('tl.pending') %></span><% } %> 27 27 </span> 28 <form method="post" action="/news paper/autoboost" class="tl-foll-ab" title="<%= t('tl.autoboost_hint') %>">28 <form method="post" action="/news/autoboost" class="tl-foll-ab" title="<%= t('tl.autoboost_hint') %>"> 29 29 <input type="hidden" name="actor_uri" value="<%= f.actor_uri %>"> 30 30 <label><input type="checkbox" name="auto_boost" value="1" <%= f.auto_boost ? 'checked' : '' %> onchange="this.form.submit()"> β¨ <%= t('tl.autoboost') %></label> 31 31 </form> 32 <form method="post" action="/news paper/unfollow"><input type="hidden" name="actor_uri" value="<%= f.actor_uri %>"><button type="submit" class="tl-unfollow"><%= t('tl.unfollow') %></button></form>32 <form method="post" action="/news/unfollow"><input type="hidden" name="actor_uri" value="<%= f.actor_uri %>"><button type="submit" class="tl-unfollow"><%= t('tl.unfollow') %></button></form> 33 33 </li> 34 34 <% }); %> -
src/views/pages/news.ejs
r69e7a79 reefd302 47 47 48 48 <div class="tl-actions"> 49 <form method="post" action="/news paper/like" class="tl-act-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" class="tl-act tl-act-like" title="<%= t('fedi.likes') %>" aria-label="<%= t('fedi.likes') %>"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 2.6l2.9 5.88 6.49.95-4.7 4.58 1.11 6.46L12 17.96l-5.8 3.06 1.1-6.46-4.69-4.58 6.49-.95z"/></svg></button></form>49 <form method="post" action="/news/like" class="tl-act-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" class="tl-act tl-act-like" title="<%= t('fedi.likes') %>" aria-label="<%= t('fedi.likes') %>"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 2.6l2.9 5.88 6.49.95-4.7 4.58 1.11 6.46L12 17.96l-5.8 3.06 1.1-6.46-4.69-4.58 6.49-.95z"/></svg></button></form> 50 50 <% if (p.boosted) { %> 51 <form method="post" action="/news paper/unboost" class="tl-act-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" class="tl-act tl-act-boost is-on" title="<%= t('tl.unboost') %>" aria-label="<%= t('tl.unboost') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg></button></form>51 <form method="post" action="/news/unboost" class="tl-act-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" class="tl-act tl-act-boost is-on" title="<%= t('tl.unboost') %>" aria-label="<%= t('tl.unboost') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg></button></form> 52 52 <% } else { %> 53 <form method="post" action="/news paper/boost" class="tl-act-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" class="tl-act tl-act-boost" title="<%= t('fedi.boosts') %>" aria-label="<%= t('fedi.boosts') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg></button></form>53 <form method="post" action="/news/boost" class="tl-act-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" class="tl-act tl-act-boost" title="<%= t('fedi.boosts') %>" aria-label="<%= t('fedi.boosts') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg></button></form> 54 54 <% } %> 55 55 <button type="button" class="tl-act tl-act-reply fedi-remote-reply-btn" data-fedi-uri="<%= p.id %>" data-fedi-ph="<%= t('fedi.remote_ph') %>" title="<%= t('fedi.remote_reply') %>" aria-label="<%= t('fedi.remote_reply') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 17 4 12 9 7"/><path d="M20 18v-2a4 4 0 0 0-4-4H4"/></svg></button> -
src/views/partials/fedi-tabs.ejs
r69e7a79 reefd302 6 6 <% var _nu = (typeof notifUnread !== 'undefined') ? notifUnread : 0; %> 7 7 <nav class="fedi-tabs" aria-label="Fediverse"> 8 <a href="/news paper" class="fedi-tab<%= _a === 'feed' ? ' is-active' : '' %>"9 hx-get="/news paper?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/newspaper" hx-indicator="#pcms-loading"><%= t('tl.tab_feed') %></a>8 <a href="/news" class="fedi-tab<%= _a === 'feed' ? ' is-active' : '' %>" 9 hx-get="/news?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/news" hx-indicator="#pcms-loading"><%= t('tl.tab_feed') %></a> 10 10 <a href="/following" class="fedi-tab<%= _a === 'following' ? ' is-active' : '' %>" 11 11 hx-get="/following?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/following" hx-indicator="#pcms-loading"><%= t('tl.tab_following') %></a> -
src/views/partials/profile-sheet.ejs
r69e7a79 reefd302 65 65 <% if (typeof canManageFedi !== 'undefined' && canManageFedi) { %> 66 66 <li role="none"> 67 <a href="/news paper" class="profile-sheet-item" role="menuitem" data-close-sheet68 hx-get="/news paper?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/newspaper" hx-indicator="#pcms-loading">67 <a href="/news" class="profile-sheet-item" role="menuitem" data-close-sheet 68 hx-get="/news?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/news" hx-indicator="#pcms-loading"> 69 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"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/></svg> 70 70 <span class="psi-label"><%= t('nav.fediverse') %></span> -
src/views/partials/topnav.ejs
r69e7a79 reefd302 158 158 <% } %> 159 159 <% if (typeof canManageFedi !== 'undefined' && canManageFedi) { %> 160 <a href="/news paper" role="menuitem" class="udi"161 hx-get="/news paper?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"162 hx-push-url="/news paper" hx-indicator="#pcms-loading">160 <a href="/news" role="menuitem" class="udi" 161 hx-get="/news?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" 162 hx-push-url="/news" hx-indicator="#pcms-loading"> 163 163 <svg class="udi-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/></svg> 164 164 <span><%= t('nav.fediverse') %></span>
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)