aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2024-06-14 10:25:10 +0200
committerGitHub <noreply@github.com>2024-06-14 10:25:10 +0200
commit3187425ca5ad83f1a4bff80246d6a57dbdf67f09 (patch)
tree5867cc92dba289fc90b84438d4f0d85faa3a6900 /apps
parent2bcf13ffd6eefe38c756259621748345a873f36c (diff)
parentdeafcc4f3a504b3757d955178c6ea4fa824804d3 (diff)
downloadnextcloud-server-3187425ca5ad83f1a4bff80246d6a57dbdf67f09.tar.gz
nextcloud-server-3187425ca5ad83f1a4bff80246d6a57dbdf67f09.zip
Merge pull request #45024 from nextcloud/man/backport/44839/stable28
[stable28] fix(files_sharing): Add one string for every share type + fix(sharingDetails): Show correct share target
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/src/views/SharingDetailsTab.vue44
1 files changed, 27 insertions, 17 deletions
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue
index 4f977baf181..6f6a6d60002 100644
--- a/apps/files_sharing/src/views/SharingDetailsTab.vue
+++ b/apps/files_sharing/src/views/SharingDetailsTab.vue
@@ -305,24 +305,34 @@ export default {
computed: {
title() {
- let title = t('files_sharing', 'Share with ')
- if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_USER) {
- title = title + this.share.shareWithDisplayName
- } else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_LINK) {
- title = t('files_sharing', 'Share link')
- } else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_GROUP) {
- title += ` (${t('files_sharing', 'group')})`
- } else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_ROOM) {
- title += ` (${t('files_sharing', 'conversation')})`
- } else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE) {
- title += ` (${t('files_sharing', 'remote')})`
- } else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP) {
- title += ` (${t('files_sharing', 'remote group')})`
- } else if (this.share.type === this.SHARE_TYPES.SHARE_TYPE_GUEST) {
- title += ` (${t('files_sharing', 'guest')})`
+ switch (this.share.type) {
+ case this.SHARE_TYPES.SHARE_TYPE_USER:
+ return t('files_sharing', 'Share with {userName}', { userName: this.share.shareWithDisplayName })
+ case this.SHARE_TYPES.SHARE_TYPE_EMAIL:
+ return t('files_sharing', 'Share with email {email}', { email: this.share.shareWith })
+ case this.SHARE_TYPES.SHARE_TYPE_LINK:
+ return t('files_sharing', 'Share link')
+ case this.SHARE_TYPES.SHARE_TYPE_GROUP:
+ return t('files_sharing', 'Share with group')
+ case this.SHARE_TYPES.SHARE_TYPE_ROOM:
+ return t('files_sharing', 'Share in conversation')
+ case this.SHARE_TYPES.SHARE_TYPE_REMOTE: {
+ const [user, server] = this.share.shareWith.split('@')
+ return t('files_sharing', 'Share with {user} on remote server {server}', { user, server })
+ }
+ case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:
+ return t('files_sharing', 'Share with remote group')
+ case this.SHARE_TYPES.SHARE_TYPE_GUEST:
+ return t('files_sharing', 'Share with guest')
+ default: {
+ if (this.share.id) {
+ // Share already exists
+ return t('files_sharing', 'Update share')
+ } else {
+ return t('files_sharing', 'Create share')
+ }
+ }
}
-
- return title
},
/**
* Can the sharee edit the shared file ?