From d436b32127b1525063964e62d7666b2edf5c464d Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Mon, 16 Jan 2023 15:38:44 +0100 Subject: [PATCH 1/3] Use SpaceNoSelection for spaces --- packages/web-app-files/src/fileSideBars.ts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) 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 }) => ({ From 499b1400e5fdc271cee16e4b3ffb577f5cd25538 Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Mon, 16 Jan 2023 15:39:28 +0100 Subject: [PATCH 2/3] Add to changelog --- changelog/unreleased/enhancement-spaces-list-in-admin-settings | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog/unreleased/enhancement-spaces-list-in-admin-settings b/changelog/unreleased/enhancement-spaces-list-in-admin-settings index 50bbbe51b05..ee769d45c6e 100644 --- a/changelog/unreleased/enhancement-spaces-list-in-admin-settings +++ b/changelog/unreleased/enhancement-spaces-list-in-admin-settings @@ -14,3 +14,4 @@ https://github.com/owncloud/web/pull/8231 https://github.com/owncloud/web/pull/8238 https://github.com/owncloud/web/pull/8234 https://github.com/owncloud/web/issues/8219 +https://github.com/owncloud/web/pull/8249 From f65fd3e30405e5cd4e621749784be04dff937a8a Mon Sep 17 00:00:00 2001 From: Paul Neubauer Date: Tue, 17 Jan 2023 09:54:24 +0100 Subject: [PATCH 3/3] Update changelog --- changelog/unreleased/enhancement-spaces-list-in-admin-settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/unreleased/enhancement-spaces-list-in-admin-settings b/changelog/unreleased/enhancement-spaces-list-in-admin-settings index ee769d45c6e..5434c439643 100644 --- a/changelog/unreleased/enhancement-spaces-list-in-admin-settings +++ b/changelog/unreleased/enhancement-spaces-list-in-admin-settings @@ -13,5 +13,5 @@ https://github.com/owncloud/web/pull/8229 https://github.com/owncloud/web/pull/8231 https://github.com/owncloud/web/pull/8238 https://github.com/owncloud/web/pull/8234 -https://github.com/owncloud/web/issues/8219 https://github.com/owncloud/web/pull/8249 +https://github.com/owncloud/web/issues/8219