последний веб

This commit is contained in:
Dmitry Borisenko
2022-10-12 03:18:04 +02:00
parent 22f1e80c60
commit 9c8bce7244
2 changed files with 60 additions and 17 deletions

View File

@@ -112,10 +112,18 @@
1: {
descr: "Ошибка json",
color: "text-red-500",
txt: "Ошибка чтения json файла с виджетами",
txt: "Ошибка чтения json файла с виджетами при отправки в mqtt",
cancel: true,
},
},
tme1: {
1: {
descr: "Ошибка времени",
color: "text-red-500",
txt: "Ошибка синхронизации времени с NTP сервером",
cancel: false,
},
},
};
import Card from "../components/Card.svelte";
@@ -123,8 +131,6 @@
export let errorsJson;
//export let rebootEsp = () => {};
export let versionsList;
export let choosingVersion;
export let coreMessages;
@@ -133,11 +139,14 @@
export let startUpdate = () => {};
export let saveSett = () => {};
export let cleanLogs = () => {};
export let rebootEsp = () => {};
export let show;
export let paramsBeenChanged = false;
let reboot = false;
export let cancelAlarm = (alarmKey) => {};
</script>
@@ -317,10 +326,48 @@
</div>
</div>
<!--I2C-->
<div class="flex mb-2 h-6 items-center">
<div class="w-2/3">
<p class="pr-4 text-gray-500 font-bold text-sm truncate">i2c SCL gpio</p>
</div>
<div class="flex justify-center w-1/3">
<input bind:value={settingsJson.pinSCL} on:change={() => (reboot = true)} class="ipt-rnd h-7 text-center focus:border-indigo-500" type="number" />
</div>
</div>
<div class="flex mb-2 h-6 items-center">
<div class="w-2/3">
<p class="pr-4 text-gray-500 font-bold text-sm truncate">i2c SDA gpio</p>
</div>
<div class="flex justify-center w-1/3">
<input bind:value={settingsJson.pinSDA} on:change={() => (reboot = true)} class="ipt-rnd h-7 text-center focus:border-indigo-500" type="number" />
</div>
</div>
<div class="flex mb-2 h-6 items-center">
<div class="w-2/3">
<p class="pr-4 text-gray-500 font-bold text-sm truncate">i2c частота</p>
</div>
<div class="flex justify-center w-1/3">
<input bind:value={settingsJson.i2cFreq} on:change={() => (reboot = true)} class="ipt-rnd h-7 text-center focus:border-indigo-500" type="number" />
</div>
</div>
<!--WORKING GROUP-->
<div class="flex mb-2 h-6 items-center">
<div class="w-2/3">
<p class="pr-4 text-gray-500 font-bold text-sm truncate">Группа устройств</p>
</div>
<div class="flex justify-center w-1/3">
<input bind:value={settingsJson.wg} on:change={() => (reboot = true)} class="ipt-rnd h-7 text-center focus:border-indigo-500" />
</div>
</div>
<!--<div class="grd-2col1">-->
{#if paramsBeenChanged}
<button class="btn-lg animate-pulse" on:click={() => (saveSett(), (paramsBeenChanged = false))}>{"Сохранить"}</button>
{/if}
{#if reboot}
<button class="btn-lg animate-pulse" on:click={() => (saveSett(), rebootEsp(), (reboot = false))}>{"Сохранить и перезагрузить"}</button>
{/if}
<!--<button class="btn-lg" on:click={() => rebootEsp()}>{"Перезагрузить"}</button>-->
<!--</div>-->
</Card>