Skip to content

Commit

Permalink
fix(files_sharing): add missing subtitle on search for share recipients
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Trovic <[email protected]>
  • Loading branch information
luka-nextcloud committed Aug 2, 2024
1 parent 6ec72ce commit e336b71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
12 changes: 6 additions & 6 deletions apps/files_sharing/src/components/SharingInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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),
}
Expand Down
10 changes: 6 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e336b71

Please sign in to comment.