diff --git a/cista-front/src/App.vue b/cista-front/src/App.vue index 80939d8..dbb7e16 100644 --- a/cista-front/src/App.vue +++ b/cista-front/src/App.vue @@ -1,7 +1,7 @@ - + { items, }) } +const props = defineProps({ + path: Array +}) defineExpose({ toggleSearchInput, diff --git a/cista-front/src/components/UploadButton.vue b/cista-front/src/components/UploadButton.vue index a125ea0..ccbcbaa 100644 --- a/cista-front/src/components/UploadButton.vue +++ b/cista-front/src/components/UploadButton.vue @@ -1,82 +1,112 @@ +
+

+ + [{{ 1 + uprogress.fileidx }}/{{ uprogress.filestart.length }}] + + {{ uprogress.filename }} + + {{ (uprogress.filepos / uprogress.filesize * 100).toFixed(0) }} % + + + + {{ (uprogress.uploaded / 1e6).toFixed(0) }} / {{ (uprogress.total / 1e6).toFixed(0) }} MB + + {{ speed.toFixed(speed < 100 ? 1 : 0) }} MB/s +

+ +
+ + diff --git a/cista-front/src/stores/documents.ts b/cista-front/src/stores/documents.ts index 8628724..59662d0 100644 --- a/cista-front/src/stores/documents.ts +++ b/cista-front/src/stores/documents.ts @@ -82,29 +82,6 @@ export const useDocumentStore = defineStore({ ) this.document = docs as Document[] }, - updateUploadingDocuments(key: number, progress: number) { - for (const d of this.uploadingDocuments) { - if (d.key === key) d.progress = progress - } - }, - pushUploadingDocuments(name: string) { - this.uploadCount++ - const document = { - key: this.uploadCount, - name: name, - progress: 0 - } - this.uploadingDocuments.push(document) - return document - }, - deleteUploadingDocument(key: number) { - this.uploadingDocuments = this.uploadingDocuments.filter(e => e.key !== key) - }, - updateModified() { - for (const d of this.document) { - if ('mtime' in d) d.modified = formatUnixDate(d.mtime) - } - }, login(username: string, privileged: boolean) { this.user.username = username this.user.privileged = privileged diff --git a/cista/api.py b/cista/api.py index d7d17b8..38b16d1 100644 --- a/cista/api.py +++ b/cista/api.py @@ -46,6 +46,7 @@ async def upload(req, ws): raise ValueError(f"Expected {req.end - pos} more bytes, got {d}") # Report success res = StatusMsg(status="ack", req=req) + print("ack", res) await asend(ws, res)