From 6a71f80718a7cc34eb01fdf42a63abb1400bc7b9 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Sun, 9 Jun 2024 00:23:39 +0200 Subject: [PATCH] Fix workflow, UI settings as store --- .github/workflows/workflow.yml | 4 ++-- src/lib/uiSettings.ts | 7 +++++++ src/routes/+page.svelte | 20 ++++++++------------ src/routes/Control.svelte | 2 +- src/routes/Settings.svelte | 2 +- 5 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 src/lib/uiSettings.ts diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 31131f2..e9da7bf 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: lts/* cache: yarn @@ -47,7 +47,7 @@ jobs: ~/.cache/pip ~/node_modules key: ${{ runner.os }}-pio - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.9' - name: Get current date diff --git a/src/lib/uiSettings.ts b/src/lib/uiSettings.ts new file mode 100644 index 0000000..3d30b18 --- /dev/null +++ b/src/lib/uiSettings.ts @@ -0,0 +1,7 @@ +import { writable } from 'svelte/store'; + +export const uiSettings = writable({ + inputSize: 'sm', + selectClass: '', + btnSize: 'lg' +}); diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 76cd8c5..eb3fed7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -9,16 +9,17 @@ import Control from './Control.svelte'; import Settings from './Settings.svelte'; import Status from './Status.svelte'; + import { uiSettings } from '$lib/uiSettings'; let settings = writable({ fgColor: '0' }); - let uiSettings = writable({ - inputSize: 'sm', - selectClass: '', - btnSize: 'lg' - }); + // let uiSettings = writable({ + // inputSize: 'sm', + // selectClass: '', + // btnSize: 'lg' + // }); let status = writable({ data: ['L', 'O', 'A', 'D', 'I', 'N', 'G'], @@ -122,14 +123,9 @@ - + - +
diff --git a/src/routes/Control.svelte b/src/routes/Control.svelte index 5bcff1d..c3b2141 100644 --- a/src/routes/Control.svelte +++ b/src/routes/Control.svelte @@ -16,9 +16,9 @@ Row } from 'sveltestrap'; import FirmwareUpdater from './FirmwareUpdater.svelte'; + import { uiSettings } from '$lib/uiSettings'; export let settings = {}; - export let uiSettings; export let customText: string; export let status: Writable<{ leds: [] }>; diff --git a/src/routes/Settings.svelte b/src/routes/Settings.svelte index c1489d0..bc0fb1f 100644 --- a/src/routes/Settings.svelte +++ b/src/routes/Settings.svelte @@ -1,5 +1,6 @@