diff --git a/changelog/unreleased/bugfix-navigating-into-external-folders b/changelog/unreleased/bugfix-navigating-into-external-folders new file mode 100644 index 00000000000..09d47538ea6 --- /dev/null +++ b/changelog/unreleased/bugfix-navigating-into-external-folders @@ -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 diff --git a/packages/web-app-files/src/index.ts b/packages/web-app-files/src/index.ts index c0f369dd1b5..1a4988a2d07 100644 --- a/packages/web-app-files/src/index.ts +++ b/packages/web-app-files/src/index.ts @@ -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() { diff --git a/packages/web-pkg/src/components/FilesList/ResourceTable.vue b/packages/web-pkg/src/components/FilesList/ResourceTable.vue index 3cf18d8c83a..e94dc0f0cbe 100644 --- a/packages/web-pkg/src/components/FilesList/ResourceTable.vue +++ b/packages/web-pkg/src/components/FilesList/ResourceTable.vue @@ -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, @@ -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 @@ -665,10 +668,7 @@ export default defineComponent({ }, context ), - ...useFolderLink({ - space: ref(props.space), - targetRouteCallback: computed(() => props.targetRouteCallback) - }), + ...folderLinkUtils, postMessage, isFilePicker, isLocationPicker, diff --git a/packages/web-pkg/src/composables/appDefaults/useAppFolderHandling.ts b/packages/web-pkg/src/composables/appDefaults/useAppFolderHandling.ts index a1ee19da9b2..5664c3fa035 100644 --- a/packages/web-pkg/src/composables/appDefaults/useAppFolderHandling.ts +++ b/packages/web-pkg/src/composables/appDefaults/useAppFolderHandling.ts @@ -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) { diff --git a/packages/web-pkg/src/composables/spaces/useGetMatchingSpace.ts b/packages/web-pkg/src/composables/spaces/useGetMatchingSpace.ts index 8818f12b408..a829abf0af1 100644 --- a/packages/web-pkg/src/composables/spaces/useGetMatchingSpace.ts +++ b/packages/web-pkg/src/composables/spaces/useGetMatchingSpace.ts @@ -40,7 +40,7 @@ export const useGetMatchingSpace = (options?: GetMatchingSpaceOptions) => { const space = getInternalSpace(storageId) - if (space) { + if (space && !isMountPointSpaceResource(space)) { return space }