fix: number of uploading files "in queue" was off by 1

Massimo Melina committed Sep 12, 2023 at 23:39 UTC 888d87d4a90a26699cc7fcdfe448c99cc04cc574
1 file changed +1 -1
frontend/src/upload.ts
+1 -1
@@ -138,7 +138,7 @@ export function showUpload() {
138 h(UploadStatus),
139 qs.length > 0 && h('div', {},
140 h(Flex, { alignItems: 'center', justifyContent: 'center', borderTop: '1px dashed', padding: '.5em' },
141 - `${_.sumBy(qs, q => q.files.length)} in queue${prefix(', ', etaStr)}`,
141 + `${_.sumBy(qs, q => q.files.length) - (uploadState.uploading ? 1 : 0)} in queue${prefix(', ', etaStr)}`,
142 iconBtn('trash', ()=> {
143 uploadState.qs = []
144 abortCurrentUpload()