feat: add 'cozy' post style
This commit is contained in:
1 parent
771f32766b
commit
1b4bd8081f
8 files changed
+264
-232
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "photon-lemmy",
|
||||
"version": "1.9.4",
|
||||
"version": "1.10.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<Icon src={ViewColumns} size="14" mini />
|
||||
View
|
||||
</span>
|
||||
<option value="list">List</option>
|
||||
<option value="card">Cards</option>
|
||||
<option value="cozy">Cozy</option>
|
||||
<option value="list">List</option>
|
||||
<option value="compact">Compact</option>
|
||||
</Select>
|
||||
@@ -11,9 +11,9 @@
|
||||
</script>
|
||||
|
||||
<Material
|
||||
class="flex flex-col flex-1 gap-1 {view == 'list' || view == 'compact'
|
||||
class="flex flex-col flex-1 gap-1 {view != 'card'
|
||||
? '!bg-transparent !border-0 rounded-none'
|
||||
: 'p-5'} {view == 'list' ? 'py-5' : view == 'compact' ? 'py-4' : ''}"
|
||||
: 'p-5'} {view == 'list' ? 'py-5' : view == 'compact' ? 'py-4' : 'py-5'}"
|
||||
color="distinct"
|
||||
padding="none"
|
||||
>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
export let post: PostView
|
||||
export let actions: boolean = true
|
||||
export let hideCommunity = false
|
||||
export let view: 'card' | 'list' | 'compact' = $userSettings.view
|
||||
export let view = $userSettings.view
|
||||
|
||||
let loaded = false
|
||||
</script>
|
||||
@@ -24,13 +24,15 @@
|
||||
color="distinct"
|
||||
padding="none"
|
||||
class="relative max-w-full min-w-0 w-full group
|
||||
{view == 'list' || view == 'compact'
|
||||
? '!bg-transparent !border-0'
|
||||
: 'p-5'} {view == 'list' ? 'py-5' : view == 'compact' ? 'py-4' : ''}"
|
||||
{view != 'card' ? '!bg-transparent !border-0' : 'p-5'} {view == 'compact'
|
||||
? 'py-4'
|
||||
: view == 'list'
|
||||
? 'py-5'
|
||||
: 'py-5'}"
|
||||
>
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
{#if view == 'list'}
|
||||
{#if view == 'list' || view == 'cozy'}
|
||||
<div
|
||||
class="absolute -inset-x-2 md:-inset-x-4 inset-y-2 scale-95 opacity-0 bg-slate-50 dark:bg-zinc-900
|
||||
-z-10 rounded-xl group-hover:opacity-100 group-hover:scale-100 transition-all"
|
||||
@@ -67,7 +69,7 @@
|
||||
</a>
|
||||
</div>
|
||||
{#if isImage(post.post.url)}
|
||||
{#if view == 'card'}
|
||||
{#if view == 'card' || view == 'cozy'}
|
||||
<!--disabled preloads here since most people will hover over every image while scrolling-->
|
||||
<svelte:component
|
||||
this={$userSettings.expandImages ? ExpandableImage : Empty}
|
||||
@@ -77,12 +79,15 @@
|
||||
<svelte:element
|
||||
this={$userSettings.expandImages ? 'div' : 'a'}
|
||||
href={postLink(post.post)}
|
||||
class="self-stretch overflow-hidden z-10 relative bg-slate-200 dark:bg-zinc-800 rounded-md max-w-full"
|
||||
class="self-stretch overflow-hidden z-10 relative {loaded
|
||||
? ''
|
||||
: 'bg-slate-200 dark:bg-zinc-800'} rounded-md max-w-full"
|
||||
data-sveltekit-preload-data="off"
|
||||
aria-label={post.post.name}
|
||||
>
|
||||
<picture
|
||||
class="flex justify-center rounded-md overflow-hidden max-h-[min(min-content, 50vh,500px)] w-full max-w-full"
|
||||
class="flex justify-center rounded-xl
|
||||
overflow-hidden w-[50vh] h-auto max-w-full"
|
||||
>
|
||||
<source
|
||||
srcset={bestImageURL(post.post, false, 512)}
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
class="flex flex-col {$userSettings.view == 'card'
|
||||
? 'gap-3 md:gap-4'
|
||||
: ''} divide-slate-200 dark:divide-zinc-800 z-[5]"
|
||||
class:divide-y={$userSettings.view == 'compact' ||
|
||||
$userSettings.view == 'list'}
|
||||
class:divide-y={$userSettings.view != 'card'}
|
||||
>
|
||||
{#if posts.length == 0}
|
||||
<div class="h-full grid place-items-center">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<span
|
||||
class="text-sm font-bold text-slate-600 dark:text-zinc-400 {$$props.class} "
|
||||
{...$$restProps}
|
||||
class="text-sm font-bold text-slate-600 dark:text-zinc-400 {$$props.class}"
|
||||
>
|
||||
<slot />
|
||||
</span>
|
||||
+4
-2
@@ -5,6 +5,8 @@ import { env } from '$env/dynamic/public'
|
||||
console.log('Using the following default settings from the environment:')
|
||||
console.log(env)
|
||||
|
||||
export type View = 'card' | 'cozy' | 'list' | 'compact'
|
||||
|
||||
export const SSR_ENABLED = env.PUBLIC_SSR_ENABLED?.toLowerCase() == 'true'
|
||||
|
||||
// Returns a proper boolean or null. Used to set boolean values from env var strings while allowing nullish coalescing to set default values.
|
||||
@@ -29,7 +31,7 @@ interface Settings {
|
||||
// deprecated
|
||||
showCompactPosts: boolean
|
||||
|
||||
view: 'card' | 'list' | 'compact'
|
||||
view: View
|
||||
|
||||
defaultSort: {
|
||||
sort: SortType
|
||||
@@ -97,7 +99,7 @@ export const defaultSettings: Settings = {
|
||||
modlogCardView: toBool(env.PUBLIC_MODLOG_CARD_VIEW) ?? undefined,
|
||||
debugInfo: false,
|
||||
expandImages: true,
|
||||
view: 'list',
|
||||
view: 'cozy',
|
||||
font: 'system',
|
||||
leftAlign: false,
|
||||
hidePhoton: toBool(env.PUBLIC_REMOVE_CREDIT) ?? false,
|
||||
|
||||
+239
-215
@@ -42,230 +42,254 @@
|
||||
</Button>
|
||||
</h1>
|
||||
|
||||
<div class="flex flex-col max-w-4xl mx-auto">
|
||||
<SectionTitle class="mt-4">UI</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Post style</span>
|
||||
<ViewSelect />
|
||||
<p slot="description">
|
||||
{#if $userSettings.view == 'list'}
|
||||
Show posts in a list, with post bodies and compact images.
|
||||
{:else if $userSettings.view == 'compact'}
|
||||
Show posts in a list, without post bodies and with tighter spacing.
|
||||
{:else if $userSettings.view == 'card'}
|
||||
Show posts in cards, with large images.
|
||||
{/if}
|
||||
</p>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Random placeholders</span>
|
||||
<span slot="description">
|
||||
Show a random placeholder for forms for comments, posts, etc.
|
||||
</span>
|
||||
<Checkbox bind:checked={$userSettings.randomPlaceholders}>
|
||||
{$userSettings.randomPlaceholders ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
|
||||
<Setting>
|
||||
<span slot="title">Default sort</span>
|
||||
<span slot="description">The default sort to use for feeds.</span>
|
||||
<div class="flex flex-wrap flex-row gap-4 w-full">
|
||||
<div class="max-w-full">
|
||||
<Select bind:value={$userSettings.defaultSort.feed} class="w-28">
|
||||
<span slot="label" class="flex items-center gap-1">
|
||||
<Icon src={GlobeAmericas} size="16" mini />
|
||||
Location
|
||||
</span>
|
||||
<option value="All">All</option>
|
||||
<option value="Local">Local</option>
|
||||
<option value="Subscribed">Subscribed</option>
|
||||
</Select>
|
||||
</div>
|
||||
<div class="max-w-full">
|
||||
<Sort bind:selected={$userSettings.defaultSort.sort} navigate={false} />
|
||||
</div>
|
||||
<div class="max-w-full">
|
||||
<Select bind:value={$userSettings.defaultSort.comments}>
|
||||
<span slot="label" class="flex items-center gap-1">
|
||||
<Icon src={ChatBubbleOvalLeftEllipsis} size="14" mini />
|
||||
Comments
|
||||
</span>
|
||||
|
||||
<option value="Hot">Hot</option>
|
||||
<option value="Top">Top</option>
|
||||
<option value="New">New</option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Use display name</span>
|
||||
<span slot="description">
|
||||
Show a user's display name instead of their account username.
|
||||
</span>
|
||||
|
||||
<Checkbox bind:checked={$userSettings.displayNames}>
|
||||
{$userSettings.displayNames ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
|
||||
<SectionTitle class="mt-4">Posts</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Fade read posts</span>
|
||||
<span slot="description">Fade the title of posts you've already read.</span>
|
||||
<Checkbox bind:checked={$userSettings.markReadPosts}>
|
||||
{$userSettings.markReadPosts ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">NSFW blur</span>
|
||||
<span slot="description">
|
||||
Blur images and remove post bodies of NSFW content.
|
||||
</span>
|
||||
<Checkbox bind:checked={$userSettings.nsfwBlur}>
|
||||
{$userSettings.nsfwBlur ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Expand Images</span>
|
||||
<span slot="description">
|
||||
Clicking on an image brings you to an expanded view rather than sending
|
||||
you to the post page.
|
||||
</span>
|
||||
<Checkbox bind:checked={$userSettings.expandImages}>
|
||||
{$userSettings.expandImages ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Hide Posts</span>
|
||||
<span slot="description">
|
||||
<p>Hide certain types of posts.</p>
|
||||
<p>
|
||||
Looking to hide read posts? That was moved to your <Link
|
||||
href="/profile/settings"
|
||||
highlight
|
||||
>
|
||||
profile settings.
|
||||
</Link>
|
||||
</p>
|
||||
</span>
|
||||
<div class="flex flex-row items-center gap-4 flex-wrap">
|
||||
<Checkbox bind:checked={$userSettings.hidePosts.deleted}>
|
||||
Deleted
|
||||
</Checkbox>
|
||||
<Checkbox bind:checked={$userSettings.hidePosts.removed}>
|
||||
Removed
|
||||
</Checkbox>
|
||||
</div>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Thumbnail Alignment</span>
|
||||
<span slot="description">
|
||||
Where thumbnails should be on the post in list/compact view.
|
||||
</span>
|
||||
<MultiSelect
|
||||
options={[true, false]}
|
||||
optionNames={['Left', 'Right']}
|
||||
bind:selected={$userSettings.leftAlign}
|
||||
/>
|
||||
</Setting>
|
||||
{#if LINKED_INSTANCE_URL}
|
||||
<div
|
||||
class="flex flex-row md:divide-x divide-slate-200 dark:divide-zinc-800"
|
||||
style="scroll-behavior: smooth;"
|
||||
>
|
||||
<nav class="hidden md:flex flex-col gap-2 w-64 pr-4 pt-4 sticky top-16 h-max">
|
||||
<SectionTitle>Navigation</SectionTitle>
|
||||
<Button href="#ui" alignment="left" color="tertiary">UI</Button>
|
||||
<Button href="#posts" alignment="left" color="tertiary">Posts</Button>
|
||||
<Button href="#instances" alignment="left" color="tertiary">
|
||||
Instances
|
||||
</Button>
|
||||
<Button href="#other" alignment="left" color="tertiary">Other</Button>
|
||||
</nav>
|
||||
<div class="flex flex-col md:flex-1 md:pl-4 min-w-0">
|
||||
<SectionTitle id="ui" class="mt-4">UI</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">
|
||||
Remove original project's credit because you don't like the creator as a
|
||||
person
|
||||
</span>
|
||||
<span slot="title">Post style</span>
|
||||
<ViewSelect />
|
||||
<p slot="description">
|
||||
{#if $userSettings.view == 'list'}
|
||||
Show posts in a list, with post bodies and compact images.
|
||||
{:else if $userSettings.view == 'cozy'}
|
||||
Card view, but without a background.
|
||||
{:else if $userSettings.view == 'compact'}
|
||||
Show posts in a list, without post bodies and with tighter spacing.
|
||||
{:else if $userSettings.view == 'card'}
|
||||
Show posts in cards, with large images.
|
||||
{/if}
|
||||
</p>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Random placeholders</span>
|
||||
<span slot="description">
|
||||
Disable the "Powered by Photon" in the top left corner, thus decreasing
|
||||
visibility of the original project and limiting discovery. The creator
|
||||
of Photon intentionally made it unobtrusive, but if you want to remove
|
||||
it because a 120x16 div bothers you so much, you have that option.
|
||||
Show a random placeholder for forms for comments, posts, etc.
|
||||
</span>
|
||||
<Checkbox bind:checked={$userSettings.hidePhoton}>
|
||||
{$userSettings.hidePhoton ? 'Enabled' : 'Disabled'}
|
||||
<Checkbox bind:checked={$userSettings.randomPlaceholders}>
|
||||
{$userSettings.randomPlaceholders ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
{/if}
|
||||
|
||||
<SectionTitle class="mt-4">Instances</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Show instances</span>
|
||||
<span slot="description">Show items' instances.</span>
|
||||
<span
|
||||
class="flex gap-0 px-3 py-2 bg-slate-100 dark:bg-zinc-800 rounded-md w-max"
|
||||
>
|
||||
Xylight
|
||||
<span class="opacity-50">@example.com</span>
|
||||
</span>
|
||||
<div class="flex flex-row flex-wrap items-center gap-4">
|
||||
<Checkbox bind:checked={$userSettings.showInstances.user}>Users</Checkbox>
|
||||
<Checkbox bind:checked={$userSettings.showInstances.comments}>
|
||||
Comments
|
||||
<Setting>
|
||||
<span slot="title">Default sort</span>
|
||||
<span slot="description">The default sort to use for feeds.</span>
|
||||
<div class="flex flex-wrap flex-row gap-4 w-full">
|
||||
<div class="max-w-full">
|
||||
<Select bind:value={$userSettings.defaultSort.feed} class="w-28">
|
||||
<span slot="label" class="flex items-center gap-1">
|
||||
<Icon src={GlobeAmericas} size="16" mini />
|
||||
Location
|
||||
</span>
|
||||
<option value="All">All</option>
|
||||
<option value="Local">Local</option>
|
||||
<option value="Subscribed">Subscribed</option>
|
||||
</Select>
|
||||
</div>
|
||||
<div class="max-w-full">
|
||||
<Sort
|
||||
bind:selected={$userSettings.defaultSort.sort}
|
||||
navigate={false}
|
||||
/>
|
||||
</div>
|
||||
<div class="max-w-full">
|
||||
<Select bind:value={$userSettings.defaultSort.comments}>
|
||||
<span slot="label" class="flex items-center gap-1">
|
||||
<Icon src={ChatBubbleOvalLeftEllipsis} size="14" mini />
|
||||
Comments
|
||||
</span>
|
||||
|
||||
<option value="Hot">Hot</option>
|
||||
<option value="Top">Top</option>
|
||||
<option value="New">New</option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Use display name</span>
|
||||
<span slot="description">
|
||||
Show a user's display name instead of their account username.
|
||||
</span>
|
||||
|
||||
<Checkbox bind:checked={$userSettings.displayNames}>
|
||||
{$userSettings.displayNames ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
<Checkbox bind:checked={$userSettings.showInstances.community}>
|
||||
Communities
|
||||
</Setting>
|
||||
|
||||
<SectionTitle class="mt-4" id="posts">Posts</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Fade read posts</span>
|
||||
<span slot="description">
|
||||
Fade the title of posts you've already read.
|
||||
</span>
|
||||
<Checkbox bind:checked={$userSettings.markReadPosts}>
|
||||
{$userSettings.markReadPosts ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</div>
|
||||
</Setting>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">NSFW blur</span>
|
||||
<span slot="description">
|
||||
Blur images and remove post bodies of NSFW content.
|
||||
</span>
|
||||
<Checkbox bind:checked={$userSettings.nsfwBlur}>
|
||||
{$userSettings.nsfwBlur ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Expand Images</span>
|
||||
<span slot="description">
|
||||
Clicking on an image brings you to an expanded view rather than sending
|
||||
you to the post page.
|
||||
</span>
|
||||
<Checkbox bind:checked={$userSettings.expandImages}>
|
||||
{$userSettings.expandImages ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Hide Posts</span>
|
||||
<span slot="description">
|
||||
<p>Hide certain types of posts.</p>
|
||||
<p>
|
||||
Looking to hide read posts? That was moved to your <Link
|
||||
href="/profile/settings"
|
||||
highlight
|
||||
>
|
||||
profile settings.
|
||||
</Link>
|
||||
</p>
|
||||
</span>
|
||||
<div class="flex flex-row items-center gap-4 flex-wrap">
|
||||
<Checkbox bind:checked={$userSettings.hidePosts.deleted}>
|
||||
Deleted
|
||||
</Checkbox>
|
||||
<Checkbox bind:checked={$userSettings.hidePosts.removed}>
|
||||
Removed
|
||||
</Checkbox>
|
||||
</div>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Thumbnail Alignment</span>
|
||||
<span slot="description">
|
||||
Where thumbnails should be on the post in list/compact view.
|
||||
</span>
|
||||
<MultiSelect
|
||||
options={[true, false]}
|
||||
optionNames={['Left', 'Right']}
|
||||
bind:selected={$userSettings.leftAlign}
|
||||
/>
|
||||
</Setting>
|
||||
{#if LINKED_INSTANCE_URL}
|
||||
<Setting>
|
||||
<span slot="title">
|
||||
Remove original project's credit because you don't like the creator as
|
||||
a person
|
||||
</span>
|
||||
<span slot="description">
|
||||
Disable the "Powered by Photon" in the top left corner, thus
|
||||
decreasing visibility of the original project and limiting discovery.
|
||||
The creator of Photon intentionally made it unobtrusive, but if you
|
||||
want to remove it because a 120x16 div bothers you so much, you have
|
||||
that option.
|
||||
</span>
|
||||
<Checkbox bind:checked={$userSettings.hidePhoton}>
|
||||
{$userSettings.hidePhoton ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
{/if}
|
||||
|
||||
<SectionTitle class="mt-4">Moderation</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Removal reply preset</span>
|
||||
<span slot="description">
|
||||
<p>The preset to use for "Reply reason" in a submission removal.</p>
|
||||
<ul class="leading-6">
|
||||
<li>Syntax:</li>
|
||||
<li>
|
||||
<code>{'{{reason}}'}</code>
|
||||
: The provided reason
|
||||
</li>
|
||||
<li>
|
||||
<code>{'{{post}}'}</code>
|
||||
: The title of the post
|
||||
</li>
|
||||
<li>
|
||||
<code>{'{{community}}'}</code>
|
||||
: The community the submission was removed in.
|
||||
</li>
|
||||
<li>
|
||||
<code>{'{{username}}'}</code>
|
||||
: The username of the creator of the submission.
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
<MarkdownEditor
|
||||
bind:value={$userSettings.moderation.removalReasonPreset}
|
||||
images={false}
|
||||
previewButton
|
||||
beforePreview={(input) =>
|
||||
removalTemplate(input, {
|
||||
postTitle: '<Example post>',
|
||||
communityLink: '[!community@example.com]()',
|
||||
reason: '<Being a meanie>',
|
||||
username: '@Bob',
|
||||
})}
|
||||
/>
|
||||
</Setting>
|
||||
<SectionTitle class="mt-4" id="instances">Instances</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Show instances</span>
|
||||
<span slot="description">Show items' instances.</span>
|
||||
<span
|
||||
class="flex gap-0 px-3 py-2 bg-slate-100 dark:bg-zinc-800 rounded-md w-max"
|
||||
>
|
||||
Xylight
|
||||
<span class="opacity-50">@example.com</span>
|
||||
</span>
|
||||
<div class="flex flex-row flex-wrap items-center gap-4">
|
||||
<Checkbox bind:checked={$userSettings.showInstances.user}>
|
||||
Users
|
||||
</Checkbox>
|
||||
<Checkbox bind:checked={$userSettings.showInstances.comments}>
|
||||
Comments
|
||||
</Checkbox>
|
||||
<Checkbox bind:checked={$userSettings.showInstances.community}>
|
||||
Communities
|
||||
</Checkbox>
|
||||
</div>
|
||||
</Setting>
|
||||
|
||||
<SectionTitle class="mt-4">Other</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Font</span>
|
||||
<span slot="description">What font Photon should use.</span>
|
||||
<MultiSelect
|
||||
options={['inter', 'system', 'browser']}
|
||||
optionNames={['Inter', 'System UI', 'Browser Font']}
|
||||
bind:selected={$userSettings.font}
|
||||
/>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Debug Info</span>
|
||||
<span slot="description">
|
||||
Show an option to show debug information. (in posts and such)
|
||||
</span>
|
||||
<SectionTitle class="mt-4" id="moderation">Moderation</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Removal reply preset</span>
|
||||
<span slot="description">
|
||||
<p>The preset to use for "Reply reason" in a submission removal.</p>
|
||||
<ul class="leading-6">
|
||||
<li>Syntax:</li>
|
||||
<li>
|
||||
<code>{'{{reason}}'}</code>
|
||||
: The provided reason
|
||||
</li>
|
||||
<li>
|
||||
<code>{'{{post}}'}</code>
|
||||
: The title of the post
|
||||
</li>
|
||||
<li>
|
||||
<code>{'{{community}}'}</code>
|
||||
: The community the submission was removed in.
|
||||
</li>
|
||||
<li>
|
||||
<code>{'{{username}}'}</code>
|
||||
: The username of the creator of the submission.
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
<MarkdownEditor
|
||||
bind:value={$userSettings.moderation.removalReasonPreset}
|
||||
images={false}
|
||||
previewButton
|
||||
beforePreview={(input) =>
|
||||
removalTemplate(input, {
|
||||
postTitle: '<Example post>',
|
||||
communityLink: '[!community@example.com]()',
|
||||
reason: '<Being a meanie>',
|
||||
username: '@Bob',
|
||||
})}
|
||||
/>
|
||||
</Setting>
|
||||
|
||||
<Checkbox bind:checked={$userSettings.debugInfo}>
|
||||
{$userSettings.debugInfo ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
<SectionTitle class="mt-4" id="other">Other</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Font</span>
|
||||
<span slot="description">What font Photon should use.</span>
|
||||
<MultiSelect
|
||||
options={['inter', 'system', 'browser']}
|
||||
optionNames={['Inter', 'System UI', 'Browser Font']}
|
||||
bind:selected={$userSettings.font}
|
||||
/>
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Debug Info</span>
|
||||
<span slot="description">
|
||||
Show an option to show debug information. (in posts and such)
|
||||
</span>
|
||||
|
||||
<Checkbox bind:checked={$userSettings.debugInfo}>
|
||||
{$userSettings.debugInfo ? 'Enabled' : 'Disabled'}
|
||||
</Checkbox>
|
||||
</Setting>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user