feat: make tag rules customizable
This commit is contained in:
1 parent
3e563ad1cc
commit
7877c97aeb
4 files changed
+40
-2
No files matched your search
@@ -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'}
|
||||
<PostBody body={post.post.body} {view} style="grid-area: body" />
|
||||
{/if}
|
||||
{#if actions}
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user