Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable27] fix(files_sharing): Add one string for every share type + fix(sharingDetails): Show correct share target #45873

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -285,24 +285,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 ?
Expand Down
4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

Loading