Skip to content

Commit

Permalink
Merge pull request #6916 from owncloud/fix-share-root-links-in-upload…
Browse files Browse the repository at this point in the history
…-overlay

Fix parent folder links for share roots in upload overlay
  • Loading branch information
kulmann authored May 10, 2022
2 parents 900e005 + 289f9f5 commit 2b69b48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog/unreleased/enhancement-introduce-sharing-jail
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ working with shares now happens inside the `Shares` navigation item.

https://github.com/owncloud/web/pull/6593
https://github.com/owncloud/web/pull/6909
https://github.com/owncloud/web/pull/6916
https://github.com/owncloud/web/issues/5152
https://github.com/owncloud/web/issues/6448
12 changes: 9 additions & 3 deletions packages/web-runtime/src/components/UploadInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,14 @@ export default {
return this.createFolderLink(path.dirname(file.path), file.storageId, file.targetRoute)
},
defaultParentFolderName(file) {
const { targetRoute } = file
// FIXME: use isLocationSpacesActive(), but it currently lies in the files app
if (file.targetRoute?.name === 'files-spaces-project') {
return file.targetRoute.params.name
if (targetRoute?.name === 'files-spaces-project') {
return targetRoute.params.name
}
// Root of a share -> use share name
if (this.hasShareJail && targetRoute?.name === 'files-spaces-share') {
return targetRoute.params.shareName
}
return this.hasShareJail ? this.$gettext('Personal') : this.$gettext('All files and folders')
},
Expand All @@ -161,7 +166,8 @@ export default {
query: targetRoute.query,
params: {
...(storageId && path && { storageId }),
...(targetRoute.params?.storage && { storage: targetRoute.params?.storage })
...(targetRoute.params?.storage && { storage: targetRoute.params?.storage }),
...(targetRoute.params?.shareName && { shareName: targetRoute.params?.shareName })
}
}
Expand Down

0 comments on commit 2b69b48

Please sign in to comment.