feat: add and close #194
This commit is contained in:
1 parent
0d7b9a2064
commit
0e29987d7f
3 files changed
+13
-2
No files matched your search
@@ -186,7 +186,11 @@
|
|||||||
<MenuButton
|
<MenuButton
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
setSessionStorage('postDraft', {
|
setSessionStorage('postDraft', {
|
||||||
body: `cross-posted from: ${post.post.ap_id}\n${
|
body: `${
|
||||||
|
$userSettings.crosspostOriginalLink
|
||||||
|
? `cross-posted from: ${post.post.ap_id}`
|
||||||
|
: ``
|
||||||
|
}\n${
|
||||||
post.post.body
|
post.post.body
|
||||||
? '>' + post.post.body.split('\n').join('\n> ')
|
? '>' + post.post.body.split('\n').join('\n> ')
|
||||||
: ''
|
: ''
|
||||||
|
|||||||
+3
-1
@@ -74,6 +74,7 @@ interface Settings {
|
|||||||
separateVotes: boolean
|
separateVotes: boolean
|
||||||
|
|
||||||
openLinksInNewTab: boolean
|
openLinksInNewTab: boolean
|
||||||
|
crosspostOriginalLink: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultSettings: Settings = {
|
export const defaultSettings: Settings = {
|
||||||
@@ -122,7 +123,8 @@ export const defaultSettings: Settings = {
|
|||||||
newWidth: true,
|
newWidth: true,
|
||||||
markPostsAsRead: true,
|
markPostsAsRead: true,
|
||||||
separateVotes: false,
|
separateVotes: false,
|
||||||
openLinksInNewTab: false
|
openLinksInNewTab: false,
|
||||||
|
crosspostOriginalLink: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export const userSettings = writable(defaultSettings)
|
export const userSettings = writable(defaultSettings)
|
||||||
|
|||||||
@@ -166,6 +166,11 @@
|
|||||||
title="Fade read posts"
|
title="Fade read posts"
|
||||||
description="Fade the title of posts you've already read."
|
description="Fade the title of posts you've already read."
|
||||||
/>
|
/>
|
||||||
|
<ToggleSetting
|
||||||
|
bind:checked={$userSettings.crosspostOriginalLink}
|
||||||
|
title="'Crossposted from' when crossposting"
|
||||||
|
description="If enabled, crossposts will include a link to the original post."
|
||||||
|
/>
|
||||||
<ToggleSetting
|
<ToggleSetting
|
||||||
bind:checked={$userSettings.nsfwBlur}
|
bind:checked={$userSettings.nsfwBlur}
|
||||||
title="NSFW blur"
|
title="NSFW blur"
|
||||||
|
|||||||
Reference in new issue
Block a user