From dc12d6acad613709d738db17cb9440b3f864164d Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:04:19 -0700 Subject: [PATCH] web/debug: add a copy button, fix page padding, refactor (#782) Co-authored-by: wukko --- web/src/components/misc/SectionHeading.svelte | 21 +++++-- web/src/routes/settings/debug/+page.svelte | 55 +++++++++++-------- 2 files changed, 47 insertions(+), 29 deletions(-) diff --git a/web/src/components/misc/SectionHeading.svelte b/web/src/components/misc/SectionHeading.svelte index 4645f2d0..e3b1e635 100644 --- a/web/src/components/misc/SectionHeading.svelte +++ b/web/src/components/misc/SectionHeading.svelte @@ -8,6 +8,9 @@ export let title: string; export let sectionId: string; export let beta = false; + export let copyData = ""; + + const sectionURL = `${$page.url.origin}${$page.url.pathname}#${sectionId}`; let copied = false; @@ -19,19 +22,27 @@
-

{title}

+

+ {title} +

+ {#if beta} -
{$t("general.beta")}
+
+ {$t("general.beta")} +
{/if} +
diff --git a/web/src/routes/settings/debug/+page.svelte b/web/src/routes/settings/debug/+page.svelte index 71079369..edb612f9 100644 --- a/web/src/routes/settings/debug/+page.svelte +++ b/web/src/routes/settings/debug/+page.svelte @@ -1,12 +1,20 @@ {#if $settings.advanced.debug} -
-

device:

-
- {JSON.stringify(device, null, 2)} -
- -

app:

-
- {JSON.stringify(app, null, 2)} -
- -

settings:

-
- {JSON.stringify($storedSettings, null, 2)} -
- -

version:

-
- {JSON.stringify($version, null, 2)} -
+
+ {#each sections as { title, data }, i} +
+ +
+ {JSON.stringify(data, null, 2)} +
+
+ {/each}
{/if}