feat: better connection error messages

resolve #159
fixes #158
fixes #153
This commit is contained in:
2025-02-14 16:31:43 +01:00
parent 45c5f21cc4
commit 089812c555
5 changed files with 134 additions and 6 deletions

View File

@@ -16,6 +16,7 @@
syncStatus,
} from "$lib/serial/connection";
import { fade, slide } from "svelte/transition";
import { showConnectionFailedDialog } from "$lib/dialogs/connection-failed-dialog";
let locale = $state(
(browser && (localStorage.getItem("locale") as Locales)) || detectLocale(),
@@ -52,9 +53,7 @@
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.",
);
await showConnectionFailedDialog(String(error));
}
}