From da6d96703411adcaaecc770d927f50df6b0d291a Mon Sep 17 00:00:00 2001 From: Pascal Wengerter Date: Mon, 6 Feb 2023 21:53:06 +0100 Subject: [PATCH] Rebase, bump uppy, rename variables, add changelog item --- .../unreleased/enhancement-show-upload-speed | 8 +++ packages/web-runtime/package.json | 4 +- .../web-runtime/src/components/UploadInfo.vue | 12 ++-- pnpm-lock.yaml | 56 +++++++++++-------- 4 files changed, 47 insertions(+), 33 deletions(-) create mode 100644 changelog/unreleased/enhancement-show-upload-speed diff --git a/changelog/unreleased/enhancement-show-upload-speed b/changelog/unreleased/enhancement-show-upload-speed new file mode 100644 index 00000000000..7c164ec05b8 --- /dev/null +++ b/changelog/unreleased/enhancement-show-upload-speed @@ -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 diff --git a/packages/web-runtime/package.json b/packages/web-runtime/package.json index fdaf967a083..963112accc8 100644 --- a/packages/web-runtime/package.json +++ b/packages/web-runtime/package.json @@ -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", diff --git a/packages/web-runtime/src/components/UploadInfo.vue b/packages/web-runtime/src/components/UploadInfo.vue index 5cf6faeb2dd..d5e6a955c4c 100644 --- a/packages/web-runtime/src/components/UploadInfo.vue +++ b/packages/web-runtime/src/components/UploadInfo.vue @@ -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) { @@ -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 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e3608d51dd5..ed7ca2a67a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -615,10 +615,10 @@ importers: '@sentry/vue': 7.31.1 '@types/luxon': 2.4.0 '@types/semver': 7.3.13 - '@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 @@ -662,11 +662,11 @@ importers: '@ownclouders/design-system': link:../design-system '@popperjs/core': 2.11.5 '@sentry/vue': 7.31.1_vue@3.2.45 - '@uppy/core': 3.0.2 - '@uppy/drop-target': 2.0.0_@uppy+core@3.0.2 - '@uppy/tus': 3.0.1_@uppy+core@3.0.2 - '@uppy/utils': 5.0.2 - '@uppy/xhr-upload': 3.0.1_@uppy+core@3.0.2 + '@uppy/core': 3.0.5 + '@uppy/drop-target': 2.0.0_@uppy+core@3.0.5 + '@uppy/tus': 3.0.1_@uppy+core@3.0.5 + '@uppy/utils': 5.1.2 + '@uppy/xhr-upload': 3.0.1_@uppy+core@3.0.5 '@vueuse/head': 1.0.22_vue@3.2.45 axios: 0.27.2 easygettext: '@github.com/owncloud/easygettext/archive/refs/tags/v2.18.1-oc.tar.gz' @@ -5995,16 +5995,16 @@ packages: /@uppy/companion-client/3.0.1: resolution: {integrity: sha512-7ZhdhdbhzOpcUGanQBrLgoVHKvj5KSSwVjaqj1OgpFuiTGh1HRBQlQsM4w6aZR2gLJfEOPdUcm0LquZvrZ3fNw==} dependencies: - '@uppy/utils': 5.0.2 + '@uppy/utils': 5.1.2 namespace-emitter: 2.0.1 dev: false - /@uppy/core/3.0.2: - resolution: {integrity: sha512-Y2lP85FfX10XwVaIVDRQNbujcWKGQo7XtHhVUwtWIcdwcbo6NNTABblcsgbXC6YeoasYII1Ij/N/ssDPK8i50Q==} + /@uppy/core/3.0.5: + resolution: {integrity: sha512-DPrSfEdJtxh5/p2U4Cl3d6Ga66k2M0eki2fIoEOC5zj1Z4vTfE3sJ945nJzrM0B7vFhFshMh7sCiNafa8HYEAg==} dependencies: '@transloadit/prettier-bytes': 0.0.9 '@uppy/store-default': 3.0.2 - '@uppy/utils': 5.0.2 + '@uppy/utils': 5.1.2 lodash.throttle: 4.1.1 mime-match: 1.0.2 namespace-emitter: 2.0.1 @@ -6012,44 +6012,44 @@ packages: preact: 10.7.1 dev: false - /@uppy/drop-target/2.0.0_@uppy+core@3.0.2: + /@uppy/drop-target/2.0.0_@uppy+core@3.0.5: resolution: {integrity: sha512-XPfXlBTjdeVw08pmeOMk/JSyZ1x6Avy3yGoDlhM/P7Y+UREgEo5BVQBjBFc9nBibwBAQpEYK/V4hMobY5ZNzag==} peerDependencies: '@uppy/core': ^3.0.0 dependencies: - '@uppy/core': 3.0.2 - '@uppy/utils': 5.0.2 + '@uppy/core': 3.0.5 + '@uppy/utils': 5.1.2 dev: false /@uppy/store-default/3.0.2: resolution: {integrity: sha512-kIQMCjXui6tjF1E9xGo4YHkvt71McXkU0FStrcQuBrRXuOhb+NcuWh3sMh3KryivVNgT6w5Odrlw2FUFkl9cqA==} dev: false - /@uppy/tus/3.0.1_@uppy+core@3.0.2: + /@uppy/tus/3.0.1_@uppy+core@3.0.5: resolution: {integrity: sha512-WdIEkrpDklTBYbDq2nobQmMo7aB4p0QKFYH+W/5Il7UBiH8NBM/leyFj+WvEIicJ/3KC4yIUFh2clD475XN3Qw==} peerDependencies: '@uppy/core': ^3.0.1 dependencies: '@uppy/companion-client': 3.0.1 - '@uppy/core': 3.0.2 - '@uppy/utils': 5.0.2 + '@uppy/core': 3.0.5 + '@uppy/utils': 5.1.2 tus-js-client: 3.0.0 dev: false - /@uppy/utils/5.0.2: - resolution: {integrity: sha512-3LpqR6o60DgdNQSnKx0eXta5wupnHjzcQvTvWNGI/ZA/AYgmhnufybK0Q/t+c0D37MaDUL10RydmFxQ+G/dXvw==} + /@uppy/utils/5.1.2: + resolution: {integrity: sha512-a/QSxcYeK1SSOjyyohi0oSwLDMJ9SSWwDELDii1WOKiJwmtt5O6pGCKHTnvrr6RwbiedngG0dZi3koYOG+MdoA==} dependencies: lodash.throttle: 4.1.1 dev: false - /@uppy/xhr-upload/3.0.1_@uppy+core@3.0.2: + /@uppy/xhr-upload/3.0.1_@uppy+core@3.0.5: resolution: {integrity: sha512-zrK0riBPk/708ClgRtEyOwhvnA/RsQPJf6QrTmeojXH/9SZ7Lhqogg9JvN7hyyoe1HLCNP3K14r42Mc9xu7rlw==} peerDependencies: '@uppy/core': ^3.0.1 dependencies: '@uppy/companion-client': 3.0.1 - '@uppy/core': 3.0.2 - '@uppy/utils': 5.0.2 + '@uppy/core': 3.0.5 + '@uppy/utils': 5.1.2 nanoid: 4.0.0 dev: false @@ -8182,7 +8182,7 @@ packages: minipass-pipeline: 1.2.4 mkdirp: 1.0.4 p-map: 4.0.0 - promise-inflight: 1.0.1_bluebird@3.7.2 + promise-inflight: 1.0.1 rimraf: 3.0.2 ssri: 8.0.1 tar: 6.1.13 @@ -18425,6 +18425,15 @@ packages: engines: {node: '>=0.4.0'} dev: true + /promise-inflight/1.0.1: + resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} + peerDependencies: + bluebird: '*' + peerDependenciesMeta: + bluebird: + optional: true + dev: true + /promise-inflight/1.0.1_bluebird@3.7.2: resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} peerDependencies: @@ -18673,7 +18682,6 @@ packages: engines: {node: '>=0.6'} dependencies: side-channel: 1.0.4 - dev: true /qs/6.5.3: resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==}