diff --git a/changelog/unreleased/enhancement-spaces-list-in-admin-settings b/changelog/unreleased/enhancement-spaces-list-in-admin-settings index 4335f92e631..2b4a3fb5aa1 100644 --- a/changelog/unreleased/enhancement-spaces-list-in-admin-settings +++ b/changelog/unreleased/enhancement-spaces-list-in-admin-settings @@ -14,4 +14,5 @@ https://github.com/owncloud/web/pull/8231 https://github.com/owncloud/web/pull/8236 https://github.com/owncloud/web/pull/8238 https://github.com/owncloud/web/pull/8234 +https://github.com/owncloud/web/pull/8249 https://github.com/owncloud/web/issues/8219 diff --git a/packages/web-app-files/src/fileSideBars.ts b/packages/web-app-files/src/fileSideBars.ts index d536993b3e7..7ca283da549 100644 --- a/packages/web-app-files/src/fileSideBars.ts +++ b/packages/web-app-files/src/fileSideBars.ts @@ -7,6 +7,7 @@ import TagsPanel from './components/SideBar/TagsPanel.vue' import NoSelection from './components/SideBar/NoSelection.vue' import SpaceActions from './components/SideBar/Actions/SpaceActions.vue' import SpaceDetails from 'web-pkg/src/components/sideBar/Spaces/Details/SpaceDetails.vue' +import SpaceNoSelection from 'web-pkg/src/components/sideBar/Spaces/SpaceNoSelection.vue' import { isLocationTrashActive, isLocationPublicActive, @@ -41,14 +42,30 @@ const panelGenerators: (({ }) => Panel)[] = [ // We don't have file details in the trashbin, yet. // Only allow `actions` panel on trashbin route for now. - ({ rootFolder, highlightedFile }): Panel => ({ + ({ router, rootFolder, highlightedFile }): Panel => ({ app: 'no-selection', icon: 'questionnaire-line', title: $gettext('Details'), component: NoSelection, default: () => true, get enabled() { - return !highlightedFile || (rootFolder && highlightedFile?.type !== 'space') + return ( + !isLocationSpacesActive(router, 'files-spaces-projects') && + (!highlightedFile || (rootFolder && highlightedFile?.type !== 'space')) + ) + } + }), + ({ router, rootFolder, highlightedFile }): Panel => ({ + app: 'no-selection', + icon: 'questionnaire-line', + title: $gettext('Details'), + component: SpaceNoSelection, + default: () => true, + get enabled() { + return ( + isLocationSpacesActive(router, 'files-spaces-projects') && + (!highlightedFile || (rootFolder && highlightedFile?.type !== 'space')) + ) } }), ({ router, multipleSelection, rootFolder, highlightedFile }) => ({