forked from btclock/webui
Fix workflow, UI settings as store
This commit is contained in:
parent
e53b487236
commit
6a71f80718
5 changed files with 19 additions and 16 deletions
4
.github/workflows/workflow.yml
vendored
4
.github/workflows/workflow.yml
vendored
|
@ -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
|
||||
|
|
7
src/lib/uiSettings.ts
Normal file
7
src/lib/uiSettings.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { writable } from 'svelte/store';
|
||||
|
||||
export const uiSettings = writable({
|
||||
inputSize: 'sm',
|
||||
selectClass: '',
|
||||
btnSize: 'lg'
|
||||
});
|
|
@ -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 @@
|
|||
|
||||
<Container fluid>
|
||||
<Row cols={{ lg: 3, sm: 1 }}>
|
||||
<Control bind:settings bind:uiSettings bind:status></Control>
|
||||
<Control bind:settings bind:status></Control>
|
||||
<Status bind:settings bind:status></Status>
|
||||
<Settings
|
||||
bind:settings
|
||||
bind:uiSettings
|
||||
on:showToast={showToast}
|
||||
on:formReset={fetchSettingsData}
|
||||
></Settings>
|
||||
<Settings bind:settings on:showToast={showToast} on:formReset={fetchSettingsData}></Settings>
|
||||
</Row>
|
||||
</Container>
|
||||
<div class="position-fixed bottom-0 end-0 p-2">
|
||||
|
|
|
@ -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: [] }>;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { PUBLIC_BASE_URL } from '$lib/config';
|
||||
import { uiSettings } from '$lib/uiSettings';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
import { _ } from 'svelte-i18n';
|
||||
|
@ -20,7 +21,6 @@
|
|||
} from 'sveltestrap';
|
||||
|
||||
export let settings;
|
||||
export let uiSettings;
|
||||
|
||||
const wifiTxPowerMap = new Map<string, number>([
|
||||
['Default', 80],
|
||||
|
|
Loading…
Reference in a new issue