Changeset eefd302 in Klonkt


Ignore:
Timestamp:
06/26/2026 05:04:49 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
cf4cf27
Parents:
69e7a79
Message:

feat(fedi): rename feed Newspaper -> News (/newspaper -> /news)

EN label + route shortened to 'News' / '/news' (+ sub-routes, links, form actions,
render path, view newspaper.ejs->news.ejs, RESERVED_SLUGS, pageTitle). NL 'Krant' and
DE 'Zeitung' unchanged.

Location:
src
Files:
7 edited
1 moved

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r69e7a79 reefd302  
    8585  'tag', 'type', 'user', 'users', 'artiesten', 'leden', 'favorieten', 'feed.xml', 'atom.xml', 'sitemap.xml',
    8686  'manifest.webmanifest', 'sw.js', 'favicon.ico', 'favicon.svg', 'assets',
    87   'authorize_interaction', 'fediverse', 'newspaper', 'following', 'notifications', 'blocking',
     87  'authorize_interaction', 'fediverse', 'news', 'following', 'notifications', 'blocking',
    8888]);
    8989
     
    614614}
    615615
    616 router.get('/newspaper', requireSiteManager, (req, res) => {
     616router.get('/news', requireSiteManager, (req, res) => {
    617617  const site = res.locals.site;
    618618  const cspOrigins = new Set();
     
    635635    }
    636636  }
    637   renderPage(req, res, 'pages/newspaper', {
    638     pageTitle: 'Newspaper', bodyClass: 'on-special',
     637  renderPage(req, res, 'pages/news', {
     638    pageTitle: 'News', bodyClass: 'on-special',
    639639    timeline,
    640640    success: req.query.success || null, error: req.query.error || null,
     
    653653});
    654654
    655 router.post('/newspaper/follow', requireSiteManager, async (req, res) => {
     655router.post('/news/follow', requireSiteManager, async (req, res) => {
    656656  const site = res.locals.site;
    657657  const handle = (req.body.handle || '').toString();
     
    669669});
    670670
    671 router.post('/newspaper/unfollow', requireSiteManager, async (req, res) => {
     671router.post('/news/unfollow', requireSiteManager, async (req, res) => {
    672672  const site = res.locals.site;
    673673  const actorUri = (req.body.actor_uri || '').toString();
     
    677677
    678678// Toggle "Featured" (show this account's posts in your Cirkel) on an account you follow.
    679 router.post('/newspaper/autoboost', requireSiteManager, (req, res) => {
     679router.post('/news/autoboost', requireSiteManager, (req, res) => {
    680680  const site = res.locals.site;
    681681  const actorUri = (req.body.actor_uri || '').toString();
     
    684684});
    685685
    686 router.post('/newspaper/like', requireSiteManager, async (req, res) => {
     686router.post('/news/like', requireSiteManager, async (req, res) => {
    687687  const site = res.locals.site;
    688688  if (site) { try { await ActivityPubService.sendInteraction(site, 'like', (req.body.note || '').toString(), (req.body.author || '').toString()); } catch (e) { /* ignore */ } }
    689   res.redirect('/newspaper?success=' + encodeURIComponent('Geliket ⭐'));
    690 });
    691 
    692 router.post('/newspaper/boost', requireSiteManager, async (req, res) => {
     689  res.redirect('/news?success=' + encodeURIComponent('Geliket ⭐'));
     690});
     691
     692router.post('/news/boost', requireSiteManager, async (req, res) => {
    693693  const site = res.locals.site;
    694694  const note = (req.body.note || '').toString();
     
    697697    ActivityPubService.markBoosted(site.slug, note); // also surface it in the Cirkel (mixed by date)
    698698  }
    699   res.redirect('/newspaper?success=' + encodeURIComponent('Geboost πŸ”'));
     699  res.redirect('/news?success=' + encodeURIComponent('Geboost πŸ”'));
    700700});
    701701
    702702// Unboost (retract): send Undo(Announce) + clear the local flag.
    703 router.post('/newspaper/unboost', requireSiteManager, async (req, res) => {
     703router.post('/news/unboost', requireSiteManager, async (req, res) => {
    704704  const site = res.locals.site;
    705705  const note = (req.body.note || '').toString();
     
    708708    ActivityPubService.unmarkBoosted(site.slug, note);
    709709  }
    710   res.redirect('/newspaper?success=' + encodeURIComponent('Boost ingetrokken'));
     710  res.redirect('/news?success=' + encodeURIComponent('Boost ingetrokken'));
    711711});
    712712
     
    739739  }
    740740  const ref = req.get('Referer') || '';
    741   res.redirect((ref.includes('/newspaper') ? '/newspaper?' : '/blocking?') + q);
     741  res.redirect((ref.includes('/news') ? '/news?' : '/blocking?') + q);
    742742});
    743743
  • src/services/i18n.js

    r69e7a79 reefd302  
    11231123    'fedi.heading': 'From the fediverse', 'fedi.likes': 'favourites', 'fedi.boosts': 'boosts', 'fedi.replies': 'Replies from the fediverse',
    11241124    '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': 'Newspaper', '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 β†’',
    11261126    'comments.to_start': 'to start the conversation.',
    11271127    'comments.reply': 'Reply', 'comments.delete': 'Delete', 'comments.cancel': 'Cancel',
  • src/views/pages/admin.ejs

    r69e7a79 reefd302  
    5555    <% } %>
    5656    <% if (typeof apEnabled === 'undefined' || apEnabled) { %>
    57       <a href="/newspaper" class="btn">🌐 <%= t('tl.title') %></a>
     57      <a href="/news" class="btn">🌐 <%= t('tl.title') %></a>
    5858      <a href="/notifications" class="btn">πŸ”” <%= t('notif.title') %></a>
    5959      <a href="/fediverse" class="btn">🐘 <%= t('admin.b_fediverse') %></a>
  • src/views/pages/following.ejs

    r69e7a79 reefd302  
    99  </div>
    1010
    11   <form method="post" action="/newspaper/follow" class="tl-follow">
     11  <form method="post" action="/news/follow" class="tl-follow">
    1212    <input type="text" name="handle" placeholder="@naam@server.social of site.com" autocomplete="off" spellcheck="false" required>
    1313    <button type="submit" class="btn btn-primary"><%= t('tl.follow_btn') %></button>
     
    2626            <% if (f.status === 'pending') { %><span class="tl-pending"><%= t('tl.pending') %></span><% } %>
    2727          </span>
    28           <form method="post" action="/newspaper/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') %>">
    2929            <input type="hidden" name="actor_uri" value="<%= f.actor_uri %>">
    3030            <label><input type="checkbox" name="auto_boost" value="1" <%= f.auto_boost ? 'checked' : '' %> onchange="this.form.submit()"> ✨ <%= t('tl.autoboost') %></label>
    3131          </form>
    32           <form method="post" action="/newspaper/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>
    3333        </li>
    3434      <% }); %>
  • src/views/pages/news.ejs

    r69e7a79 reefd302  
    4747
    4848          <div class="tl-actions">
    49             <form method="post" action="/newspaper/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>
    5050            <% if (p.boosted) { %>
    51             <form method="post" action="/newspaper/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>
    5252            <% } else { %>
    53             <form method="post" action="/newspaper/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>
    5454            <% } %>
    5555            <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  
    66<% var _nu = (typeof notifUnread !== 'undefined') ? notifUnread : 0; %>
    77<nav class="fedi-tabs" aria-label="Fediverse">
    8   <a href="/newspaper" class="fedi-tab<%= _a === 'feed' ? ' is-active' : '' %>"
    9      hx-get="/newspaper?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>
    1010  <a href="/following" class="fedi-tab<%= _a === 'following' ? ' is-active' : '' %>"
    1111     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  
    6565      <% if (typeof canManageFedi !== 'undefined' && canManageFedi) { %>
    6666      <li role="none">
    67         <a href="/newspaper" class="profile-sheet-item" role="menuitem" data-close-sheet
    68            hx-get="/newspaper?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">
    6969          <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>
    7070          <span class="psi-label"><%= t('nav.fediverse') %></span>
  • src/views/partials/topnav.ejs

    r69e7a79 reefd302  
    158158              <% } %>
    159159              <% if (typeof canManageFedi !== 'undefined' && canManageFedi) { %>
    160                 <a href="/newspaper" role="menuitem" class="udi"
    161                    hx-get="/newspaper?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
    162                    hx-push-url="/newspaper" 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">
    163163                  <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>
    164164                  <span><%= t('nav.fediverse') %></span>
Note: See TracChangeset for help on using the changeset viewer.