diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-03-11 10:53:10 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-03-11 12:30:15 +0100 |
commit | 31ddfb02946ee9a84d02aab1b01817de2ea83282 (patch) | |
tree | aa1903e974482efbcc18ee3f497d292cef981168 /apps/files_sharing/src/components/SharingInput.vue | |
parent | 7f06a0cf8e58a89c7fa78dd4bf00d76a120039ab (diff) | |
download | nextcloud-server-31ddfb02946ee9a84d02aab1b01817de2ea83282.tar.gz nextcloud-server-31ddfb02946ee9a84d02aab1b01817de2ea83282.zip |
Fix SharingInput Multiselect
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/src/components/SharingInput.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingInput.vue | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index e2d6eef03fc..ab079369f73 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -35,6 +35,8 @@ :searchable="true" :user-select="true" open-direction="below" + label="displayName" + track-by="id" @search-change="asyncFind" @select="addShare"> <template #noOptions> @@ -233,6 +235,7 @@ export default { const lookupEntry = [] if (data.lookupEnabled && !lookup) { lookupEntry.push({ + id: 'global-lookup', isNoUser: true, displayName: t('files_sharing', 'Search globally'), lookup: true, @@ -404,26 +407,27 @@ export default { * @returns {Object} */ formatForMultiselect(result) { - let desc + let subtitle if (result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_USER && this.config.shouldAlwaysShowUnique) { - desc = result.shareWithDisplayNameUnique ?? '' + subtitle = 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) { - desc = t('files_sharing', 'on {server}', { server: result.value.server }) + subtitle = t('files_sharing', 'on {server}', { server: result.value.server }) } else if (result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_EMAIL) { - desc = result.value.shareWith + subtitle = result.value.shareWith } else { - desc = result.shareWithDescription ?? '' + subtitle = result.shareWithDescription ?? '' } return { + id: `${result.value.shareType}-${result.value.shareWith}`, shareWith: result.value.shareWith, shareType: result.value.shareType, user: result.uuid || result.value.shareWith, isNoUser: result.value.shareType !== this.SHARE_TYPES.SHARE_TYPE_USER, displayName: result.name || result.label, - desc, + subtitle, shareWithDisplayNameUnique: result.shareWithDisplayNameUnique || '', icon: this.shareTypeToIcon(result.value.shareType), } |