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", () =>
|
||||
connect({
|
||||
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" />
|
||||
<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/sweetalert/dist/sweetalert.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user