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

Fix 'Open folder'-action for re-shares #7790

Merged
merged 1 commit into from
Oct 13, 2022
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
1 change: 1 addition & 0 deletions changelog/unreleased/bugfix-routing-for-re-shares
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Bugfix: Routing for re-shares
We've fixed a bug where routing into re-shares and their parent folders from the "Shared with others/via link" page was broken.

https://github.com/owncloud/web/pull/7771
https://github.com/owncloud/web/pull/7790
https://github.com/owncloud/web/issues/7347
11 changes: 10 additions & 1 deletion packages/web-app-files/src/mixins/actions/navigate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '../../router'
import { ShareStatus } from 'web-client/src/helpers/share'
import merge from 'lodash-es/merge'
import { buildShareSpaceResource } from 'web-client/src/helpers'
import { buildShareSpaceResource, isShareSpaceResource } from 'web-client/src/helpers'
import { configurationManager } from 'web-pkg/src/configuration'
import { createFileRouteOptions } from 'web-pkg/src/helpers/router'

Expand Down Expand Up @@ -52,6 +52,15 @@ export default {
canBeDefault: true,
componentType: 'router-link',
route: ({ resources }) => {
if (
isShareSpaceResource(this.space) &&
(isLocationSharesActive(this.$router, 'files-shares-with-others') ||
isLocationSharesActive(this.$router, 'files-shares-via-link'))
) {
// FIXME: This is a hacky way to resolve re-shares, but we don't have other options currently
return { name: 'resolvePrivateLink', params: { fileId: resources[0].fileId } }
}

return merge(
{},
this.routeName,
Expand Down