Skip to content

Commit

Permalink
[full-ci] Use SpaceNoSelection for spaces (#8249)
Browse files Browse the repository at this point in the history
* Use SpaceNoSelection for spaces

* Add to changelog

* Update changelog
  • Loading branch information
lookacat authored Jan 17, 2023
1 parent ec292dc commit e1de578
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 19 additions & 2 deletions packages/web-app-files/src/fileSideBars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 }) => ({
Expand Down

0 comments on commit e1de578

Please sign in to comment.