From 2130b6c7b9ddfb8c96ffff77dfaa37c9eb4753c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Mon, 24 Jul 2023 22:58:10 +0200 Subject: [PATCH] feat: settings wip --- src/lib/components/layout/Layout.svelte | 89 ++++++++++ src/lib/components/layout/LayoutCC1.svelte | 141 ++++----------- src/lib/serial/device.ts | 15 +- src/lib/serial/settings.ts | 41 ----- src/lib/style/toggle.scss | 3 +- src/routes/BackupPopup.svelte | 3 + src/routes/ConnectionPopup.svelte | 9 +- src/routes/config/chords/+page.svelte | 6 - src/routes/config/layout/+page.svelte | 4 +- src/routes/config/settings/+page.svelte | 191 ++++++++++++++++++++- 10 files changed, 338 insertions(+), 164 deletions(-) create mode 100644 src/lib/components/layout/Layout.svelte delete mode 100644 src/lib/serial/settings.ts diff --git a/src/lib/components/layout/Layout.svelte b/src/lib/components/layout/Layout.svelte new file mode 100644 index 00000000..74e39297 --- /dev/null +++ b/src/lib/components/layout/Layout.svelte @@ -0,0 +1,89 @@ + + +
+ + +
+ {#each [["Numeric Layer", "123", 1], ["Primary Layer", "abc", 0], ["Function Layer", "function", 2]] as [title, icon, value]} + + {/each} +
+ + {#if device === "ONE"} + + {:else} +

Unsupported device ({$serialPort?.device})

+ {/if} +
+ + diff --git a/src/lib/components/layout/LayoutCC1.svelte b/src/lib/components/layout/LayoutCC1.svelte index ad074337..ee222a7b 100644 --- a/src/lib/components/layout/LayoutCC1.svelte +++ b/src/lib/components/layout/LayoutCC1.svelte @@ -1,121 +1,52 @@ -
-
- {#each [["Numeric Layer", "123", 1], ["Primary Layer", "abc", 0], ["Function Layer", "function", 2]] as [title, icon, value]} - - {/each} -
- -
-
-
- -
- - -
-
- - -
- +
+
+
+ +
+ +
- -
- -
- - -
-
- - -
- +
+ +
+
-
- - -
-
- - -
-
- - + +
+ +
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +