feat: inform user when save action failed

fixes #67
This commit is contained in:
2023-12-30 16:04:16 +01:00
parent 560206129e
commit a15d5dde38

View File

@@ -35,6 +35,7 @@
let redoQueue: Change[] = []
async function save() {
try {
const port = $serialPort
if (!port) return
$syncStatus = "uploading"
@@ -112,8 +113,13 @@
$deviceChords = $chords.filter(({deleted}) => !deleted).map(({actions, phrase}) => ({actions, phrase}))
$deviceSettings = $settings.map(({value}) => value)
$changes = []
} catch (e) {
alert(e)
console.error(e)
} finally {
$syncStatus = "done"
}
}
</script>
<button