Skip to content

Commit

Permalink
Fix: alert message of dfu.html (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin authored Jul 3, 2024
2 parents 0723ca5 + 65fb5d9 commit 6257111
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pug/src/dfu.pug
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ block script
// 有可能是因為不支援 cmdGetGitVersion
ultra.emitter.emit('error', _.set(new Error(err.message), 'originalError', err))
}
await Swal.fire({ icon: 'info', text: 'Click OK to enter DFU mode then reconnect device!' })
this.showLoading({ text: 'Connect device...' })
await ultra.cmdDfuEnter()
await Swal.fire({ icon: 'info', text: 'Please reconnect your device!' })
if (!ultra.isConnected()) await ultra.connect()
if (!ultra.isDfu()) throw new Error('Device is not in DFU mode')
}
Expand Down Expand Up @@ -208,8 +209,9 @@ block script
// 有可能是因為不支援 cmdGetGitVersion
ultra.emitter.emit('error', _.set(new Error(err.message), 'originalError', err))
}
await Swal.fire({ icon: 'info', text: 'Click OK to enter DFU mode then reconnect device!' })
this.showLoading({ text: 'Connect device...' })
await ultra.cmdDfuEnter()
await Swal.fire({ icon: 'info', text: 'Please reconnect your device!' })
if (!ultra.isConnected()) await ultra.connect()
if (!ultra.isDfu()) throw new Error('Device is not in DFU mode')
}
Expand Down

0 comments on commit 6257111

Please sign in to comment.