mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2025-12-12 22:06:18 +00:00
Compare commits
2 Commits
f3b1d76666
...
2a872bafac
| Author | SHA1 | Date | |
|---|---|---|---|
|
2a872bafac
|
|||
|
a940d1b480
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "charachorder-device-manager",
|
"name": "charachorder-device-manager",
|
||||||
"version": "2.3.0",
|
"version": "2.4.0",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "app"
|
name = "app"
|
||||||
version = "2.3.0"
|
version = "2.4.0"
|
||||||
description = "A Tauri App"
|
description = "A Tauri App"
|
||||||
authors = ["Thea Schöbl <dev@theaninova.de>"]
|
authors = ["Thea Schöbl <dev@theaninova.de>"]
|
||||||
license = "AGPL-3"
|
license = "AGPL-3"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"devPath": "http://localhost:5173",
|
"devPath": "http://localhost:5173",
|
||||||
"distDir": "../build"
|
"distDir": "../build"
|
||||||
},
|
},
|
||||||
"package": { "productName": "amacc1ng", "version": "2.3.0" },
|
"package": { "productName": "amacc1ng", "version": "2.4.0" },
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": { "all": false },
|
"allowlist": { "all": false },
|
||||||
"bundle": {
|
"bundle": {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { downloadBackup } from "$lib/backup/backup";
|
import { downloadBackup } from "$lib/backup/backup";
|
||||||
import { initSerial, serialPort } from "$lib/serial/connection";
|
import { initSerial, serialPort } from "$lib/serial/connection";
|
||||||
import { fade, slide } from "svelte/transition";
|
import { fade, slide } from "svelte/transition";
|
||||||
|
import { lt as semverLt } from "semver";
|
||||||
import type { LoaderOptions, ESPLoader } from "esptool-js";
|
import type { LoaderOptions, ESPLoader } from "esptool-js";
|
||||||
|
|
||||||
let { data } = $props();
|
let { data } = $props();
|
||||||
@@ -10,6 +11,10 @@
|
|||||||
let success = $state(false);
|
let success = $state(false);
|
||||||
let error = $state<Error | undefined>(undefined);
|
let error = $state<Error | undefined>(undefined);
|
||||||
|
|
||||||
|
let isTooOld = $derived(
|
||||||
|
$serialPort ? semverLt($serialPort.version, "2.0.0") : false,
|
||||||
|
);
|
||||||
|
|
||||||
let unsafeUpdate = $state(false);
|
let unsafeUpdate = $state(false);
|
||||||
|
|
||||||
let terminalOutput = $state("");
|
let terminalOutput = $state("");
|
||||||
@@ -202,10 +207,18 @@
|
|||||||
style:--progress="{progress * 100}%"
|
style:--progress="{progress * 100}%"
|
||||||
class:primary={!buttonError}
|
class:primary={!buttonError}
|
||||||
class:error={buttonError}
|
class:error={buttonError}
|
||||||
disabled={working || $serialPort === undefined || !isCorrectDevice}
|
disabled={isTooOld ||
|
||||||
|
working ||
|
||||||
|
$serialPort === undefined ||
|
||||||
|
!isCorrectDevice}
|
||||||
onclick={update}>Apply Update</button
|
onclick={update}>Apply Update</button
|
||||||
>
|
>
|
||||||
{#if $serialPort && isCorrectDevice}
|
{#if isTooOld}
|
||||||
|
<div class="error" transition:slide>
|
||||||
|
Your device's firmware is too old to be updated via OTA. Follow the
|
||||||
|
instruction below to update it manually.
|
||||||
|
</div>
|
||||||
|
{:else if $serialPort && isCorrectDevice}
|
||||||
<div transition:slide>
|
<div transition:slide>
|
||||||
Your
|
Your
|
||||||
<b
|
<b
|
||||||
@@ -233,9 +246,11 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<label class="unsafe-opt-in"
|
{#if !isTooOld}
|
||||||
><input type="checkbox" /> Unsafe recovery options</label
|
<label class="unsafe-opt-in"
|
||||||
>
|
><input type="checkbox" /> Unsafe recovery options</label
|
||||||
|
>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="unsafe-updates">
|
<div class="unsafe-updates">
|
||||||
|
|||||||
Reference in New Issue
Block a user