Skip to content

Commit eb58f8e

Browse files
authored
Merge pull request #44918 from nextcloud/backport/44839/stable29
fix(sharingDetails): Show correct share target
2 parents 73d1a10 + 547d584 commit eb58f8e

10 files changed

Lines changed: 24 additions & 14 deletions

apps/files_sharing/src/views/SharingDetailsTab.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,20 +340,30 @@ 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')
349-
case this.SHARE_TYPES.SHARE_TYPE_REMOTE:
350-
return t('files_sharing', 'Share with remote')
351+
case this.SHARE_TYPES.SHARE_TYPE_REMOTE: {
352+
const [user, server] = this.share.shareWith.split('@')
353+
return t('files_sharing', 'Share with {user} on remote server {server}', { user, server })
354+
}
351355
case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:
352356
return t('files_sharing', 'Share with remote group')
353357
case this.SHARE_TYPES.SHARE_TYPE_GUEST:
354358
return t('files_sharing', 'Share with guest')
355-
default:
356-
return t('files_sharing', 'Share with')
359+
default: {
360+
if (this.share.id) {
361+
// Share already exists
362+
return t('files_sharing', 'Update share')
363+
} else {
364+
return t('files_sharing', 'Create share')
365+
}
366+
}
357367
}
358368
},
359369
/**

dist/4997-4997.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

dist/4997-4997.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/6364-6364.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/6364-6364.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-common.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)