mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-30 20:09:24 +03:00
начал писать систему формирования виджетов
This commit is contained in:
@@ -371,6 +371,7 @@
|
|||||||
|
|
||||||
function saveConfig() {
|
function saveConfig() {
|
||||||
generateLayout();
|
generateLayout();
|
||||||
|
wsSendMsg(wsSelected, "/tuoyal" + JSON.stringify(generateLayout()));
|
||||||
wsSendMsg(wsSelected, "/gifnoc" + JSON.stringify(configJson));
|
wsSendMsg(wsSelected, "/gifnoc" + JSON.stringify(configJson));
|
||||||
clearData();
|
clearData();
|
||||||
sendCurrentPageName();
|
sendCurrentPageName();
|
||||||
@@ -398,9 +399,10 @@
|
|||||||
if (error) console.log("[e]", "error, widget not found: " + setWidget);
|
if (error) console.log("[e]", "error, widget not found: " + setWidget);
|
||||||
}
|
}
|
||||||
if (debug) console.log("[i]", JSON.stringify(layout));
|
if (debug) console.log("[i]", JSON.stringify(layout));
|
||||||
wigets = layout;
|
return layout;
|
||||||
wigets = wigets;
|
//wigets = layout;
|
||||||
wigetsUpdate();
|
//wigets = wigets;
|
||||||
|
//wigetsUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearData() {
|
function clearData() {
|
||||||
@@ -462,7 +464,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wigetsUpdate() {
|
function wigetsUpdate() {
|
||||||
//wigets = JSON.parse(document.getElementById("text1").value);
|
|
||||||
findNewPage();
|
findNewPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -696,10 +697,6 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</Card>
|
</Card>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
<Card title="Редактор JSON">
|
|
||||||
<textarea on:input={wigetsUpdate} rows="10" class="jsn-ipt w-full" id="text1">{syntaxHighlight(JSON.stringify(wigets))}</textarea>
|
|
||||||
</Card>
|
|
||||||
</div>
|
</div>
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/config">
|
<Route path="/config">
|
||||||
@@ -815,6 +812,9 @@
|
|||||||
</Route>
|
</Route>
|
||||||
<Route path="/about">
|
<Route path="/about">
|
||||||
<button on:click={() => showModal()} type="button"> Toggle modal </button>
|
<button on:click={() => showModal()} type="button"> Toggle modal </button>
|
||||||
|
<Card title="Редактор JSON">
|
||||||
|
<textarea on:input={wigetsUpdate} rows="10" class="jsn-ipt w-full" id="text1">{syntaxHighlight(JSON.stringify(wigets))}</textarea>
|
||||||
|
</Card>
|
||||||
</Route>
|
</Route>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user