Changeset 837fc9c in Klonkt for src/services
- Timestamp:
- 06/27/2026 07:51:44 AM (3 months ago)
- Branches:
- main
- Children:
- 92f6976
- Parents:
- aa45208
- Location:
- src/services
- Files:
-
- 3 edited
-
ActivityPubService.js (modified) (2 diffs)
-
Scheduler.js (modified) (2 diffs)
-
i18n.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
raa45208 r837fc9c 246 246 tag: Array.isArray(post.tags) ? post.tags.map((t) => ({ type: 'Hashtag', name: '#' + String(t).replace(/\s+/g, '') })) : [], 247 247 replies: `${id}/replies`, 248 // NSFW → Mastodon-style content warning: sensitive (blurs media) + a summary/spoiler 249 // (hides the whole post behind a "Gevoelige inhoud" button until the reader opens it). 250 sensitive: !!post.nsfw, 248 251 }; 252 if (post.nsfw) note.summary = 'Gevoelige inhoud'; 249 253 if (attachment.length) note.attachment = attachment; 250 254 // Playable-audio posts suppress the cover attachment (player card). Still expose … … 771 775 if (!site) return; 772 776 const recent = db.prepare( 773 `SELECT id, slug, title, content, cover_image_url, published_at, created_at777 `SELECT id, slug, title, content, cover_image_url, nsfw, published_at, created_at 774 778 FROM posts WHERE site_id = ? AND status = 'published' AND (fan_only IS NULL OR fan_only = 0) 775 779 ORDER BY COALESCE(published_at, created_at) DESC LIMIT 20` -
src/services/Scheduler.js
raa45208 r837fc9c 15 15 try { 16 16 const due = db.prepare(` 17 SELECT p.id, p.site_id, p.slug, p.title, p.content, p.cover_image_url, p.fan_only, 17 SELECT p.id, p.site_id, p.slug, p.title, p.content, p.cover_image_url, p.fan_only, p.nsfw, 18 18 p.published_at, p.publish_at, p.created_at, u.username 19 19 FROM posts p JOIN users u ON u.id = p.author_id … … 39 39 id: p.id, slug: p.slug, title: p.title || p.slug, 40 40 content: p.content, cover_image_url: p.cover_image_url || null, 41 published_at: p.published_at || p.publish_at, created_at: p.created_at, fan_only: p.fan_only, 41 published_at: p.published_at || p.publish_at, created_at: p.created_at, fan_only: p.fan_only, nsfw: p.nsfw, 42 42 }).catch(() => { /* best-effort */ }); 43 43 } -
src/services/i18n.js
raa45208 r837fc9c 771 771 'pedit.pin_top': 'bovenaan', 772 772 'pedit.pin_nth_suffix': 'e van boven', 773 'pedit.noindex_label': 'noindex (verberg voor zoekmachines)', 773 'pedit.noindex_label': 'noindex (verberg voor zoekmachines)', 'pedit.nsfw_label': 'NSFW / gevoelige inhoud', 'post.nsfw_warning': 'Gevoelige inhoud', 'post.nsfw_show': 'Tonen', 774 774 'pedit.fan_only_label': 'Alleen voor ingelogde fans', 775 775 'pedit.schedule_label': 'Publicatie inplannen', … … 1782 1782 'pedit.pin_top': 'at the top', 1783 1783 'pedit.pin_nth_suffix': 'th from top', 1784 'pedit.noindex_label': 'noindex (hide from search engines)', 1784 'pedit.noindex_label': 'noindex (hide from search engines)', 'pedit.nsfw_label': 'NSFW / sensitive content', 'post.nsfw_warning': 'Sensitive content', 'post.nsfw_show': 'Show', 1785 1785 'pedit.fan_only_label': 'Logged-in fans only', 1786 1786 'pedit.schedule_label': 'Schedule publication', … … 2793 2793 'pedit.pin_top': 'ganz oben', 2794 2794 'pedit.pin_nth_suffix': '. von oben', 2795 'pedit.noindex_label': 'noindex (vor Suchmaschinen verbergen)', 2795 'pedit.noindex_label': 'noindex (vor Suchmaschinen verbergen)', 'pedit.nsfw_label': 'NSFW / sensibler Inhalt', 'post.nsfw_warning': 'Sensibler Inhalt', 'post.nsfw_show': 'Anzeigen', 2796 2796 'pedit.fan_only_label': 'Nur für angemeldete Fans', 2797 2797 'pedit.schedule_label': 'Veröffentlichung planen',
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)