mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-06-04 04:48:55 +00:00
feat: use progress api
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
sync,
|
||||
syncProgress,
|
||||
syncStatus,
|
||||
waitForDevice,
|
||||
} from "$lib/serial/connection";
|
||||
import ProgressButton from "$lib/ProgressButton.svelte";
|
||||
import { tick } from "svelte";
|
||||
@@ -136,6 +137,7 @@
|
||||
empty.add(id);
|
||||
}
|
||||
}
|
||||
|
||||
changes.update((changes) => {
|
||||
changes.push([
|
||||
...empty.keys().map(
|
||||
@@ -242,6 +244,8 @@
|
||||
|
||||
let progressCurrent = 0;
|
||||
|
||||
await waitForDevice(port);
|
||||
|
||||
function updateProgress() {
|
||||
syncProgress.set({
|
||||
max: progressMax,
|
||||
|
||||
Reference in New Issue
Block a user