Add sweetalert to show styled alert on web bluetooth/socket.io errors
This commit is contained in:
@@ -115,5 +115,7 @@ function revsToRPM(prevRes, res) {
|
|||||||
btn.addEventListener("click", () =>
|
btn.addEventListener("click", () =>
|
||||||
connect({
|
connect({
|
||||||
onChange: parseCSC,
|
onChange: parseCSC,
|
||||||
}).catch(console.error)
|
}).catch((err) => {
|
||||||
|
swal("Oops", err, "error");
|
||||||
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
||||||
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
|
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
|
||||||
<script src="https://unpkg.com/htmx.org"></script>
|
<script src="https://unpkg.com/htmx.org"></script>
|
||||||
|
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user