Skip to content

Multiple fixes found when running web with CERNBox #11946

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

Closed
wants to merge 8 commits into from
Closed
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-cannot-upload-without-tus
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Upload without TUS support

We've fixed a bug where it was not possible upload/create files when the server does not support TUS.
Web crashed trying to see if the user had permissions to upload. Even if they did, it was being denied due to that crash.

https://github.com/owncloud/web/pull/11946
5 changes: 5 additions & 0 deletions changelog/unreleased/bugfix-favorites
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Listing of favorites

We've fixed a bug where it was not possible to list favorites.

https://github.com/owncloud/web/pull/11946
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-no-parent-id
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: No parent id set

The parameter Resource.parentFolderId is optional, so we treated it as so when getting the ancestor metadata.
This prevented the loading of a resource/listing of files, if the backend did not report the parent of the current folder.

https://github.com/owncloud/web/pull/11946
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-preview-configuration
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Preview service configuration

When the capabilities specified a different list of mime types that the server supported, this was not being taken into consideration.
With this fix, it now works.

https://github.com/owncloud/web/pull/11946
5 changes: 5 additions & 0 deletions changelog/unreleased/change-remove-collapsible-table
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Change: Remove the collapsible table

Removed the CERN-only feature of collapsible table. Replaced with the filtering functionality in the shares page.

https://github.com/owncloud/web/pull/11946
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Sidebar menu selected for different kinds of personal volumes

The current implementation hardcodes the naming of the volumes and assumes that the personal volume always starts with `personal/`, which might not be the case.
With this enhancement, the selection of the menu happens if the corresponding type of space is selected as well.

https://github.com/owncloud/web/pull/11946
54 changes: 46 additions & 8 deletions packages/web-app-files/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ import { AppNavigationItem } from '@ownclouders/web-pkg'

// dirty: importing view from other extension within project
import SearchResults from '../../web-app-search/src/views/List.vue'
import { isPersonalSpaceResource, isShareSpaceResource } from '@ownclouders/web-client'
import {
isPersonalSpaceResource,
isShareSpaceResource,
isProjectSpaceResource,
isMountPointSpaceResource
} from '@ownclouders/web-client'
import { ComponentCustomProperties, unref } from 'vue'
import { extensionPoints } from './extensionPoints'

Expand Down Expand Up @@ -57,6 +62,19 @@ export const navItems = (context: ComponentCustomProperties): AppNavigationItem[
isActive: () => {
return !spacesStores.currentSpace || spacesStores.currentSpace?.isOwner(userStore.user)
},
activeFor: () => {
const personalSpace = spacesStores.spaces.find(
(drive) => isPersonalSpaceResource(drive) && drive.isOwner(userStore.user)
)

return personalSpace
? [
{
path: `/${appInfo.id}/spaces/${personalSpace.driveAlias}`
}
]
: []
},
isVisible() {
if (!spacesStores.spacesInitialized) {
return true
Expand Down Expand Up @@ -90,11 +108,21 @@ export const navItems = (context: ComponentCustomProperties): AppNavigationItem[
// last check is when fullShareOwnerPaths is enabled
return !space || isShareSpaceResource(space) || !space?.isOwner(userStore.user)
},
activeFor: [
{ path: `/${appInfo.id}/spaces/share` },
{ path: `/${appInfo.id}/spaces/ocm-share` },
{ path: `/${appInfo.id}/spaces/personal` }
],
activeFor: () => {
const shares = [
{ path: `/${appInfo.id}/spaces/share` },
{ path: `/${appInfo.id}/spaces/ocm-share` },
{ path: `/${appInfo.id}/spaces/personal` }
]
spacesStores.spaces.forEach((drive) => {
if (isMountPointSpaceResource(drive)) {
shares.push({
path: `/${appInfo.id}/spaces/${drive.root?.remoteItem?.driveAlias}`
})
}
})
return shares
},
isVisible() {
return capabilityStore.sharingApiEnabled !== false
},
Expand All @@ -106,7 +134,17 @@ export const navItems = (context: ComponentCustomProperties): AppNavigationItem[
route: {
path: `/${appInfo.id}/spaces/projects`
},
activeFor: [{ path: `/${appInfo.id}/spaces/project` }],
activeFor: () => {
const projects = [{ path: `/${appInfo.id}/spaces/project` }]
spacesStores.spaces.forEach((drive) => {
if (isProjectSpaceResource(drive)) {
projects.push({
path: `/${appInfo.id}/spaces/${drive.driveAlias}`
})
}
})
return projects
},
isVisible() {
return capabilityStore.spacesProjects
},
Expand All @@ -118,7 +156,7 @@ export const navItems = (context: ComponentCustomProperties): AppNavigationItem[
route: {
path: `/${appInfo.id}/trash/overview`
},
activeFor: [{ path: `/${appInfo.id}/trash` }],
activeFor: () => [{ path: `/${appInfo.id}/trash` }],
isVisible() {
return (
capabilityStore.davTrashbin === '1.0' &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class FolderLoaderFavorites implements FolderLoader {
signal: signal1
})

resources = resources.map(buildResource)
resources = resources.results.map(buildResource)
resourcesStore.initResourceList({ currentFolder: null, resources })
})
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web-pkg/src/apps/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface AppReadyHookArgs {

export interface AppNavigationItem {
isActive?: () => boolean
activeFor?: { name?: string; path?: string }[]
activeFor?: () => { name?: string; path?: string }[]
isVisible?: () => boolean
fillType?: IconFillType
icon?: string
Expand Down
Loading