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, module: true,
toplevel: true, toplevel: true,
unsafe_arrows: true, unsafe_arrows: true,
drop_console: false, drop_console: true,
drop_debugger: true, drop_debugger: true,
}, },
output: { quote_style: 1 }, output: { quote_style: 1 },

View File

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

View File

@@ -8,6 +8,7 @@
export let show; export let show;
export let myProfileJson; export let myProfileJson;
export let userdata; export let userdata;
export let updateBuild = (path) => {};
import CrossIcon from "../svg/Cross.svelte"; import CrossIcon from "../svg/Cross.svelte";
let errors = []; let errors = [];
let allmodeinfo = null; let allmodeinfo = null;
@@ -228,7 +229,7 @@
<div onClick={() => showLog(build, "fs.txt")}>{st[build.status.fs]}</div> <div onClick={() => showLog(build, "fs.txt")}>{st[build.status.fs]}</div>
</td> </td>
{#if build.status.build === 2 && build.status.preparation === 2 && build.status.fs === 2} {#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> <p class="w-fill">Установить</p>
</td> </td>
{:else} {:else}