Skip to content

Commit 93c9862

Browse files
committedSep 16, 2022
Using the message box to indicate pending upload/download
1 parent b571808 commit 93c9862

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎ui/arduino/store.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,18 @@ function store(state, emitter) {
185185
emitter.emit('render')
186186
})
187187
emitter.on('upload', async () => {
188+
log('upload')
189+
emitter.emit('message', 'Uploading file... Please wait')
188190
await serial.uploadFile(state.diskPath, state.selectedFile)
191+
emitter.emit('message', 'File uploaded!', 500)
189192
emitter.emit('update-files')
190193
emitter.emit('render')
191194
})
192195
emitter.on('download', async () => {
196+
log('download')
197+
emitter.emit('message', 'Downloading file... Please wait')
193198
await serial.downloadFile(state.diskPath, state.selectedFile)
199+
emitter.emit('message', 'File downloaded!', 500)
194200
emitter.emit('update-files')
195201
emitter.emit('render')
196202
})

0 commit comments

Comments
 (0)
Please sign in to comment.