This commit is contained in:
Dmitry Borisenko
2022-09-13 22:44:37 +02:00
parent 951243fe57
commit 3bf24d62f3
7 changed files with 47 additions and 18 deletions

View File

@@ -19,8 +19,6 @@
export let rebootEsp = () => {};
export let cleanLogs = () => {};
let hideAllSubParams = true;
function elementsDropdownChange() {
for (let i = 0; i < itemsJson.length; i++) {
let item = Object.assign({}, itemsJson[i]);
@@ -100,10 +98,10 @@
</select></td>
<td class="tbl-bdy-lg"><input bind:value={element.page} class="ipt-lg w-full" type="text" /></td>
<td class="tbl-bdy-lg"><input bind:value={element.descr} class="ipt-lg w-full" type="text" /></td>
<td class="tbl-bdy-lg"><OpenIcon click={() => (hideAllSubParams = !hideAllSubParams)} /></td>
<td class="tbl-bdy-lg"><OpenIcon click={() => (element.show = !element.show)} /></td>
<td class="tbl-bdy-lg"><CrossIcon click={() => deleteLineFromConfig(i)} /></td>
</tr>
{#if !hideAllSubParams}
{#if element.show}
{#each Object.entries(element) as [key, param]}
{#if key != "type" && key != "subtype" && key != "id" && key != "widget" && key != "page" && key != "descr"}
<tr class="txt-sz txt-pad">
@@ -127,7 +125,7 @@
</Card>
<Card title="Сценарии">
<textarea bind:value={scenarioJson.scen} rows={height} cols="50" class="px-2 bg-gray-50 border-2 border-gray-200 rounded text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 w-full" />
<textarea bind:value={scenarioJson.scen} rows={height} class="px-2 bg-gray-50 border-2 border-gray-200 rounded text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-indigo-500 w-full" />
</Card>
</div>
<div class="grd-1col1">

View File

@@ -14,8 +14,8 @@
return json;
};
export let errorsJson;
export let layoutJson;
export let errorsJson;
export let settingsJson;
export let configJson;
export let itemsJson;
@@ -23,18 +23,18 @@
<div class="grd-3col1">
<Card title="layoutJson">
<textarea on:input={layoutJson} rows="23" cols="50" id="1">{syntaxHighlight(JSON.stringify(layoutJson))}</textarea>
<textarea on:input={layoutJson} rows="23" class="w-full" id="1">{syntaxHighlight(JSON.stringify(layoutJson))}</textarea>
</Card>
<Card title="errorsJson">
<textarea on:input={errorsJson} rows="23" cols="50" id="2">{syntaxHighlight(JSON.stringify(errorsJson))}</textarea>
<textarea on:input={errorsJson} rows="23" class="w-full" id="2">{syntaxHighlight(JSON.stringify(errorsJson))}</textarea>
</Card>
<Card title="settingsJson">
<textarea on:input={settingsJson} rows="23" cols="50" id="3">{syntaxHighlight(JSON.stringify(settingsJson))}</textarea>
<textarea on:input={settingsJson} rows="23" class="w-full" id="3">{syntaxHighlight(JSON.stringify(settingsJson))}</textarea>
</Card>
<Card title="configJson">
<textarea on:input={configJson} rows="23" cols="50" id="3">{syntaxHighlight(JSON.stringify(configJson))}</textarea>
<textarea on:input={configJson} rows="23" class="w-full" id="3">{syntaxHighlight(JSON.stringify(configJson))}</textarea>
</Card>
<Card title="itemsJson">
<textarea on:input={itemsJson} rows="23" cols="50" id="3">{syntaxHighlight(JSON.stringify(itemsJson))}</textarea>
<textarea on:input={itemsJson} rows="23" class="w-full" id="4">{syntaxHighlight(JSON.stringify(itemsJson))}</textarea>
</Card>
</div>

9
src/pages/Files.svelte Normal file
View File

@@ -0,0 +1,9 @@
<script>
import Card from "../components/Card.svelte";
</script>
<div class="grd-3col1">
<Card title="layoutJson">
<p>123</p>
</Card>
</div>

View File

@@ -245,6 +245,14 @@
<p class="text-green-500 font-bold text-center truncate">{errorsJson.heap}</p>
</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">Остаток flash</p>
</div>
<div class="flex justify-center w-1/3 text-sm text-center">
<p class="text-green-500 font-bold text-center truncate">{errorsJson.freeBytes}</p>
</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">Кол-во записей на flash</p>