Changeset b7d4458 in Klonkt for src/views/pages


Ignore:
Timestamp:
06/27/2026 08:10:43 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
c21197a
Parents:
92f6976
Message:

feat(nsfw): custom content-warning text + blur in the Cirkel

  • Per-post content-warning text (like Mastodon): editor field; used as the on-site veil/banner label and the fediverse Note summary (falls back to 'Gevoelige inhoud').
  • Cirkel feed now blurs remote sensitive posts: ap_timeline gets nsfw+cw (captured from the incoming Note's sensitive/summary), getCirkelPosts returns them, circle.js maps them so post-card/tile show the veil.
Location:
src/views/pages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/post-edit.ejs

    r92f6976 rb7d4458  
    242242          <span>🔞 <%= t('pedit.nsfw_label') %></span>
    243243        </label>
     244        <input type="text" name="content_warning" value="<%= post.content_warning || '' %>" maxlength="200"
     245               placeholder="<%= t('pedit.nsfw_cw_ph') %>"
     246               style="width:100%;box-sizing:border-box;margin:6px 0 2px;font-size:13px;padding:7px 9px">
    244247        <% if (typeof premiumUnlocked === 'undefined' || premiumUnlocked) { %>
    245248          <label class="pe-checkbox">
  • src/views/pages/post.ejs

    r92f6976 rb7d4458  
    1313    <div class="nsfw-banner">
    1414      <span class="nsfw-banner-icon">🔞</span>
    15       <span class="nsfw-banner-text"><%= t('post.nsfw_warning') %></span>
     15      <span class="nsfw-banner-text"><%= post.content_warning || t('post.nsfw_warning') %></span>
    1616      <button type="button" class="nsfw-banner-btn nsfw-reveal"><%= t('post.nsfw_show') %></button>
    1717    </div>
Note: See TracChangeset for help on using the changeset viewer.