From 5b6d369101454ac42138b0c1a2a510ab40d1c86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Sat, 6 Apr 2024 17:43:43 +0200 Subject: [PATCH] feat: add pre-ccos hint when connection errors resolves #99 --- src/routes/ConnectionPopup.svelte | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/routes/ConnectionPopup.svelte b/src/routes/ConnectionPopup.svelte index 45774195..76e63e33 100644 --- a/src/routes/ConnectionPopup.svelte +++ b/src/routes/ConnectionPopup.svelte @@ -23,6 +23,17 @@ powerDialog = false; } + async function connect() { + try { + await initSerial(true); + } catch (error) { + console.error(error); + alert( + "Connection failed. Is your device maybe pre-CCOS? Refer to the doc link in the bottom left for more information on your device.", + ); + } + } + let rebootInfo = false; let terminal = false; let powerDialog = false; @@ -114,7 +125,7 @@ >{$LL.deviceManager.DISCONNECT()} {:else} - {/if}