feat: debounce connection suspension

This commit is contained in:
2023-12-15 16:43:56 +01:00
parent c8e04ed6cc
commit c3bd8431e5
5 changed files with 46 additions and 3 deletions

View File

@@ -21,6 +21,13 @@
powerDialog = false
}
async function updateFirmware() {
const {usbVendorId: vendorId, usbProductId: productId} = $serialPort!.portInfo
$serialPort!.bootloader()
await new Promise(resolve => setTimeout(resolve, 1000))
console.log(await navigator.usb.requestDevice({filters: [{vendorId, productId}]}))
}
let rebootInfo = false
let terminal = false
let powerDialog = false
@@ -44,6 +51,7 @@
<br />
Version {$serialPort.version}
</p>
<!--<button on:click={updateFirmware}>Update</button>-->
{/if}
{#if browser}