Skip to content

Commit bb08417

Browse files
committed
refactor(sharingDetails): Show correct share target
The share details page should show the target email or user/server to which the user is creating the share. Signed-off-by: fenn-cs <[email protected]>
1 parent b5e3508 commit bb08417

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

apps/files_sharing/src/views/SharingDetailsTab.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,20 +340,25 @@ export default {
340340
switch (this.share.type) {
341341
case this.SHARE_TYPES.SHARE_TYPE_USER:
342342
return t('files_sharing', 'Share with {userName}', { userName: this.share.shareWithDisplayName })
343+
case this.SHARE_TYPES.SHARE_TYPE_EMAIL:
344+
return t('files_sharing', 'Share with email {email}', { email: this.share.shareWith })
343345
case this.SHARE_TYPES.SHARE_TYPE_LINK:
344346
return t('files_sharing', 'Share link')
345347
case this.SHARE_TYPES.SHARE_TYPE_GROUP:
346348
return t('files_sharing', 'Share with group')
347349
case this.SHARE_TYPES.SHARE_TYPE_ROOM:
348350
return t('files_sharing', 'Share in conversation')
349351
case this.SHARE_TYPES.SHARE_TYPE_REMOTE:
350-
return t('files_sharing', 'Share with remote')
352+
return (() => {
353+
const [user, server] = this.share.shareWith.split('@')
354+
return t('files_sharing', 'Share with {user} on remote server {server}', { user, server })
355+
})()
351356
case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:
352357
return t('files_sharing', 'Share with remote group')
353358
case this.SHARE_TYPES.SHARE_TYPE_GUEST:
354359
return t('files_sharing', 'Share with guest')
355360
default:
356-
return t('files_sharing', 'Share with')
361+
return t('files_sharing', this.share.id ? 'Create share' : 'Update share')
357362
}
358363
},
359364
/**

0 commit comments

Comments
 (0)