Skip to content

Commit

Permalink
Rebase, bump uppy, rename variables, add changelog item
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalwengerter committed Feb 6, 2023
1 parent df441d2 commit da6d967
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 33 deletions.
8 changes: 8 additions & 0 deletions changelog/unreleased/enhancement-show-upload-speed
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Show upload speed

We have added a tooltip that shows the current upload speed and
absolute vs processed filesize for the current upload.

https://github.com/owncloud/web/issues/8166
https://github.com/owncloud/web/pull/8187
https://github.com/owncloud/ocis/issues/5511
4 changes: 2 additions & 2 deletions packages/web-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"@ownclouders/design-system": "workspace:*",
"@popperjs/core": "^2.11.5",
"@sentry/vue": "7.31.1",
"@uppy/core": "^3.0.2",
"@uppy/core": "^3.0.5",
"@uppy/drop-target": "^2.0.0",
"@uppy/tus": "^3.0.1",
"@uppy/utils": "^5.0.2",
"@uppy/utils": "^5.1.2",
"@uppy/xhr-upload": "^3.0.1",
"@vueuse/head": "1.0.22",
"axios": "^0.27.2",
Expand Down
12 changes: 5 additions & 7 deletions packages/web-runtime/src/components/UploadInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ export default defineComponent({
if (this.uploadSpeed === 0) {
return ''
}
const todo = filesize(this.bytesUploaded)
const done = filesize(this.bytesTotal)
const uploadedBytes = filesize(this.bytesUploaded)
const totalBytes = filesize(this.bytesTotal)
const currentUploadSpeed = filesize(this.uploadSpeed)
// needs $gettext interpolation
return `${todo} of ${done} (${currentUploadSpeed}/s)`
return `${uploadedBytes} of ${totalBytes} (${currentUploadSpeed}/s)`
},
uploadInfoTitle() {
if (this.inFinalization) {
Expand Down Expand Up @@ -310,11 +310,9 @@ export default defineComponent({
const timeElapsed = +new Date() - this.timeStarted
// "bytesTotal" is a wrong type documentation,
// fix in progress via https://github.com/transloadit/uppy/pull/4263
this.uploadSpeed = getSpeed({
bytesTotal: this.timeStarted,
bytesUploaded: this.bytesUploaded
bytesUploaded: this.bytesUploaded,
uploadStarted: this.timeStarted
})
const progressPercent = (100 * this.bytesUploaded) / this.bytesTotal
Expand Down
56 changes: 32 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit da6d967

Please sign in to comment.