From 8313d5de4e39a1e206c985b7b1079f5afccfdf10 Mon Sep 17 00:00:00 2001 From: Liam Conway <11491642+liconway@users.noreply.github.com> Date: Fri, 2 Feb 2024 02:05:55 -0700 Subject: [PATCH] Quick! Working admin panel --- src/routes/admin/+page.svelte | 104 ++++++++++++++++++++++++++++++++ src/routes/control/+page.svelte | 4 +- 2 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 src/routes/admin/+page.svelte diff --git a/src/routes/admin/+page.svelte b/src/routes/admin/+page.svelte new file mode 100644 index 0000000..b7e8264 --- /dev/null +++ b/src/routes/admin/+page.svelte @@ -0,0 +1,104 @@ + + +
+ + + {#if division_names[active_division] === undefined} +

Division {active_division} undefined

+ {:else} +
+

{`${division_names[active_division]} Division`}

+ {#each Object.entries(displays[active_division]) as [field, field_data] } +
+

Field {field}

+ +
+ + +
+ {/each} +
+ {/if} +
\ No newline at end of file diff --git a/src/routes/control/+page.svelte b/src/routes/control/+page.svelte index 0a3b0a9..a6243b8 100644 --- a/src/routes/control/+page.svelte +++ b/src/routes/control/+page.svelte @@ -82,14 +82,14 @@ client.on("message", (topic, message) => { {#each Object.entries(displays) as [name, info]}

{name}

- client.publish(`display/${name}/class`, info.class, { retain: true })}> {#each classes as c} {/each} - client.publish(`display/${name}/state`, info.state, { retain: true })}> {#each states as s}