diff --git a/src/lib/components/lemmy/post/Post.svelte b/src/lib/components/lemmy/post/Post.svelte index 7d459d40..ea2fa577 100644 --- a/src/lib/components/lemmy/post/Post.svelte +++ b/src/lib/components/lemmy/post/Post.svelte @@ -150,7 +150,7 @@ /> {/if} {/key} - {#if post.post.body && !post.post.nsfw && view != 'compact' && !hideBody} + {#if post.post.body && !post.post.nsfw && view != 'compact' && !hideBody && rule != 'hide'} {/if} {#if actions} diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json index 0dc284c1..2d003467 100644 --- a/src/lib/i18n/en.json +++ b/src/lib/i18n/en.json @@ -639,7 +639,13 @@ }, "titleTags": { "title": "Parse tags in title", - "description": "Take text in [brackets] and turn it into tags that you can click to search for." + "description": "Take text in [brackets] and turn it into tags that you can click to search for.", + "rules": { + "title": "Rules", + "blur": "Blur", + "hide": "Hide", + "show": "Show" + } } }, "embeds": { diff --git a/src/lib/settings.ts b/src/lib/settings.ts index d86ce9b0..55084a3c 100644 --- a/src/lib/settings.ts +++ b/src/lib/settings.ts @@ -91,6 +91,7 @@ interface Settings { language: string | null useRtl: boolean translator: string | undefined + parseTags: boolean tagRules: { [key: string]: 'hide' | 'blur' } @@ -162,9 +163,11 @@ export const defaultSettings: Settings = { language: env.PUBLIC_LANGUAGE ?? null, useRtl: false, translator: env.PUBLIC_TRANSLATOR ?? undefined, + parseTags: true, tagRules: { cw: 'blur', nsfl: 'blur', + nsfw: 'blur', }, } diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index d44f3d71..cb0b9113 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -295,6 +295,35 @@ pattern={DOMAIN_REGEX_FORMS} /> +
+ + + + {$t('settings.app.titleTags.rules.title')} + +
+ {#each Object.keys($userSettings.tagRules) as rule} +
+ {rule} + +
+ {/each} +
+
+