mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
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
This commit is contained in:
commit
3187425ca5
8 changed files with 34 additions and 24 deletions
|
|
@ -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 ?
|
||||
|
|
|
|||
3
dist/5552-5552.js
vendored
Normal file
3
dist/5552-5552.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/5552-5552.js.map
vendored
Normal file
1
dist/5552-5552.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
dist/6797-6797.js
vendored
3
dist/6797-6797.js
vendored
File diff suppressed because one or more lines are too long
1
dist/6797-6797.js.map
vendored
1
dist/6797-6797.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue