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: ocm folder issues #11758

Merged
merged 2 commits into from
Oct 11, 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
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-navigating-into-external-folders
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Navigating into folders that have been shared externally

We've fixed an issue where navigating into folders that have been shared externally would not work.

https://github.com/owncloud/web/pull/11758
https://github.com/owncloud/web/issues/11753
1 change: 1 addition & 0 deletions packages/web-app-files/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const navItems = (context: ComponentCustomProperties): AppNavigationItem[
},
activeFor: [
{ path: `/${appInfo.id}/spaces/share` },
{ path: `/${appInfo.id}/spaces/ocm-share` },
{ path: `/${appInfo.id}/spaces/personal` }
],
isVisible() {
Expand Down
12 changes: 6 additions & 6 deletions packages/web-pkg/src/components/FilesList/ResourceTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,10 @@ export default defineComponent({
const capabilityStore = useCapabilityStore()
const { getMatchingSpace } = useGetMatchingSpace()
const { canBeOpenedWithSecureView } = useCanBeOpenedWithSecureView()
const { getFolderLink } = useFolderLink()
const folderLinkUtils = useFolderLink({
space: ref(props.space),
targetRouteCallback: computed(() => props.targetRouteCallback)
})
const { isSticky } = useIsTopBarSticky()
const {
isLocationPicker,
Expand Down Expand Up @@ -622,7 +625,7 @@ export default defineComponent({

const getResourceLink = (resource: Resource) => {
if (resource.isFolder) {
return getFolderLink(resource)
return folderLinkUtils.getFolderLink(resource)
}

let space = props.space
Expand Down Expand Up @@ -665,10 +668,7 @@ export default defineComponent({
},
context
),
...useFolderLink({
space: ref(props.space),
targetRouteCallback: computed(() => props.targetRouteCallback)
}),
...folderLinkUtils,
postMessage,
isFilePicker,
isLocationPicker,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function useAppFolderHandling({
})

const isSpaceRoot = spacesStore.spaces.some(
(s) => isMountPointSpaceResource(s) && s.root.remoteItem.id === pathResource.id
(s) => isMountPointSpaceResource(s) && s.root.remoteItem?.id === pathResource.id
)

if (isSpaceRoot) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const useGetMatchingSpace = (options?: GetMatchingSpaceOptions) => {

const space = getInternalSpace(storageId)

if (space) {
if (space && !isMountPointSpaceResource(space)) {
return space
}

Expand Down