ota update

This commit is contained in:
IoT Manager
2023-10-05 19:10:32 +02:00
parent 1b9adefde6
commit 173c3ab9d3
3 changed files with 9 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ export default {
module: true,
toplevel: true,
unsafe_arrows: true,
drop_console: false,
drop_console: true,
drop_debugger: true,
},
output: { quote_style: 1 },

View File

@@ -1207,6 +1207,11 @@
}
}
function updateBuild(path) {
wsSendMsg(selectedWs, "/update|" + path);
}
//depricated
function startUpdate(all) {
if (choosingVersion !== undefined) {
//if (choosingVersion === errorsJson.bver) {
@@ -1343,7 +1348,7 @@
</Route>
<Route path="/profile">
<Profile show={pageReady.profile} myProfileJson={myProfileJson} userdata={userdata} />
<Profile show={pageReady.profile} myProfileJson={myProfileJson} userdata={userdata} updateBuild={(path) => updateBuild(path)} />
</Route>
<Route path="/login">
<Login show={true} />

View File

@@ -8,6 +8,7 @@
export let show;
export let myProfileJson;
export let userdata;
export let updateBuild = (path) => {};
import CrossIcon from "../svg/Cross.svelte";
let errors = [];
let allmodeinfo = null;
@@ -228,7 +229,7 @@
<div onClick={() => showLog(build, "fs.txt")}>{st[build.status.fs]}</div>
</td>
{#if build.status.build === 2 && build.status.preparation === 2 && build.status.fs === 2}
<td onClick={() => showLog(build, "fs.txt")} class="tbl-bdy-lg ipt-lg w-full cursor-pointer select-none bg-green-100 hover:bg-green-200">
<td onClick={() => updateBuild("123")} class="tbl-bdy-lg ipt-lg w-full cursor-pointer select-none bg-green-100 hover:bg-green-200">
<p class="w-fill">Установить</p>
</td>
{:else}