+
+ {#if $userSettings.debugInfo}
+ {#if debug}
+ {#await import('$lib/components/util/debug/DebugObject.svelte') then { default: DebugObject }}
+
+ {/await}
+ {/if}
+
+ {/if}
{#if $profile?.user && (amMod($profile.user, post.community) || isAdmin($profile.user))}
{/if}
@@ -106,8 +117,8 @@
slot="button"
aria-label="Post actions"
on:click={toggleOpen}
- class="!p-1.5 dark:text-zinc-400 text-slate-500 hover:text-inherit h-full"
- color="secondary"
+ class="hover:text-inherit"
+ size="square-md"
>
diff --git a/src/lib/components/util/debug/DebugObject.svelte b/src/lib/components/util/debug/DebugObject.svelte
new file mode 100644
index 00000000..219002db
--- /dev/null
+++ b/src/lib/components/util/debug/DebugObject.svelte
@@ -0,0 +1,12 @@
+
+
+
+ Debug
+
+
diff --git a/src/lib/components/util/debug/DebugTree.svelte b/src/lib/components/util/debug/DebugTree.svelte
new file mode 100644
index 00000000..a07d9c52
--- /dev/null
+++ b/src/lib/components/util/debug/DebugTree.svelte
@@ -0,0 +1,24 @@
+
+
+
+ {#each Object.keys(object) as key}
+
+
+ {key}
+
+ {#if typeof object[key] === 'object'}
+
+ {:else}
+ {object[key]}
+ {/if}
+
+ {/each}
+
+
+
diff --git a/src/lib/settings.ts b/src/lib/settings.ts
index bb2b5ecc..707f34b5 100644
--- a/src/lib/settings.ts
+++ b/src/lib/settings.ts
@@ -50,6 +50,7 @@ interface Settings {
newVote: boolean
randomPlaceholders: boolean
modlogCardView: boolean | undefined
+ debugInfo: boolean
}
export const defaultSettings: Settings = {
@@ -87,6 +88,7 @@ export const defaultSettings: Settings = {
newVote: toBool(env.PUBLIC_NEW_VOTE_BUTTONS) ?? false,
randomPlaceholders: toBool(env.PUBLIC_RANDOM_PLACEHOLDERS) ?? true,
modlogCardView: toBool(env.PUBLIC_MODLOG_CARD_VIEW) ?? undefined,
+ debugInfo: false,
}
export const userSettings = writable(defaultSettings)
diff --git a/src/routes/post/[instance]/[id=integer]/+page.svelte b/src/routes/post/[instance]/[id=integer]/+page.svelte
index a2867ff2..37c87bdb 100644
--- a/src/routes/post/[instance]/[id=integer]/+page.svelte
+++ b/src/routes/post/[instance]/[id=integer]/+page.svelte
@@ -23,6 +23,7 @@
import CommunityLink from '$lib/components/lemmy/community/CommunityLink.svelte'
import Link from '$lib/components/input/Link.svelte'
import SectionTitle from '$lib/components/ui/SectionTitle.svelte'
+ import { userSettings } from '$lib/settings.js'
export let data
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte
index 8a5dab74..d1025c0b 100644
--- a/src/routes/settings/+page.svelte
+++ b/src/routes/settings/+page.svelte
@@ -199,4 +199,14 @@
})}
/>
+
+
Other
+
+
+ Debug Info
+
+
+ Show an option to show debug information. (in posts and such)
+
+