Skip to content

Commit

Permalink
Minor UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pkendall64 committed Oct 28, 2023
1 parent 6753982 commit d8e29b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ flashButton.onclick = async (e) => {
text: 'Firmware upload complete'
})
} catch (e) {
errorHandler(e.message)
return errorHandler(e.message)
} finally {
closeDevice()
}
Expand Down Expand Up @@ -818,7 +818,7 @@ function errorHandler (msg) {
_('status').innerHTML = ''
_('progressBar').value = 0
mui.overlay('off')
SwalMUI.fire({
return SwalMUI.fire({
icon: 'error',
title: 'Update Failed',
html: msg
Expand All @@ -829,7 +829,7 @@ function abortHandler (event) {
_('status').innerHTML = ''
_('progressBar').value = 0
mui.overlay('off')
SwalMUI.fire({
return SwalMUI.fire({
icon: 'info',
title: 'Update Aborted',
html: event.target.responseText
Expand Down
7 changes: 1 addition & 6 deletions src/js/xmodem.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,7 @@ class XmodemFlasher {
while (!gotBootloader) {
currAttempt++
if (currAttempt > 10) {
await SwalMUI.fire({
icon: 'error',
title: 'Flashing Failed',
text: 'Failed to enter bootloader mode in a reasonable time'
})
throw new Error('[FAILED] to get to BL in reasonable time')
throw new Error('Failed to enter bootloader mode in a reasonable time')
}
this.log(`[${currAttempt}] retry...`)

Expand Down

0 comments on commit d8e29b4

Please sign in to comment.