From 123aefbb42e961c77877c7c3095fe2f92b971692 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Fri, 2 Aug 2024 18:42:34 +0200 Subject: [PATCH] fix(files_sharing): add missing subtitle on search for share recipients Signed-off-by: Luka Trovic --- apps/files_sharing/src/components/SharingInput.vue | 12 ++++++------ package-lock.json | 10 ++++++---- package.json | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index 7dbce6f849342..519c6bf884c55 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -438,17 +438,17 @@ export default { * @return {object} */ formatForMultiselect(result) { - let subtitle + let subname if (result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_USER && this.config.shouldAlwaysShowUnique) { - subtitle = result.shareWithDisplayNameUnique ?? '' + subname = result.shareWithDisplayNameUnique ?? '' } else if ((result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_REMOTE || result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP ) && result.value.server) { - subtitle = t('files_sharing', 'on {server}', { server: result.value.server }) + subname = t('files_sharing', 'on {server}', { server: result.value.server }) } else if (result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_EMAIL) { - subtitle = result.value.shareWith + subname = result.value.shareWith } else { - subtitle = result.shareWithDescription ?? '' + subname = result.shareWithDescription ?? '' } return { @@ -457,7 +457,7 @@ export default { user: result.uuid || result.value.shareWith, isNoUser: result.value.shareType !== this.SHARE_TYPES.SHARE_TYPE_USER, displayName: result.name || result.label, - subtitle, + subname, shareWithDisplayNameUnique: result.shareWithDisplayNameUnique || '', ...this.shareTypeToIcon(result.value.shareType), } diff --git a/package-lock.json b/package-lock.json index 5803beca65eb9..697dc59c76e90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "@nextcloud/router": "^3.0.1", "@nextcloud/sharing": "^0.2.2", "@nextcloud/upload": "^1.1.1", - "@nextcloud/vue": "^8.14.0", + "@nextcloud/vue": "^8.15.1", "@skjnldsv/sanitize-svg": "^1.0.2", "@vueuse/components": "^10.11.0", "@vueuse/core": "^10.11.0", @@ -4807,9 +4807,10 @@ } }, "node_modules/@nextcloud/vue": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.14.0.tgz", - "integrity": "sha512-hB3dG7tZWpItC74PfbTLW02754qYXFDH+h7Ksq6b7e8WlhnKLWrhNGKhSpNDt9/g+vb5bSIOxbiDZIJZ63hAuQ==", + "version": "8.15.1", + "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.15.1.tgz", + "integrity": "sha512-gZEcXPNhRGYhjSd/IeTs0jQ5P8tPIv9BJm5A8qsdpB1Mb/Xb9suhJv1xHaeGcOGoUCcs7A66coPkCgv1zcSJ2w==", + "license": "AGPL-3.0-or-later", "dependencies": { "@floating-ui/dom": "^1.1.0", "@linusborg/vue-simple-portal": "^0.1.5", @@ -4822,6 +4823,7 @@ "@nextcloud/l10n": "^3.0.1", "@nextcloud/logger": "^3.0.1", "@nextcloud/router": "^3.0.0", + "@nextcloud/sharing": "^0.2.2", "@nextcloud/timezones": "^0.1.1", "@nextcloud/vue-select": "^3.25.0", "@vueuse/components": "^10.9.0", diff --git a/package.json b/package.json index 3840e4843f44a..6597f88ba963d 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@nextcloud/router": "^3.0.1", "@nextcloud/sharing": "^0.2.2", "@nextcloud/upload": "^1.1.1", - "@nextcloud/vue": "^8.14.0", + "@nextcloud/vue": "^8.15.1", "@skjnldsv/sanitize-svg": "^1.0.2", "@vueuse/components": "^10.11.0", "@vueuse/core": "^10.11.0",