Skip to content

Commit

Permalink
Merge pull request #11758 from owncloud/fix/ocm-folder-issues
Browse files Browse the repository at this point in the history
fix: ocm folder issues
  • Loading branch information
JammingBen authored Oct 11, 2024
2 parents dbebd70 + 3e084d2 commit 67fa6ef
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
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

0 comments on commit 67fa6ef

Please sign in to comment.