Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Hide deprecated projects in sidebar by default #2544

Closed
wants to merge 11 commits into from
223 changes: 142 additions & 81 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion src/js/views/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<SideBarTabShare />
</AppSidebarTab>

<AppSidebarTab v-if="acl.loggedIn && useCollaboration"
<AppSidebarTab v-if="projectsEnabled && acl.loggedIn && useCollaboration"
:id="'collaboration'"
:order="4"
:name="t('polls', 'Collaboration')">
Expand Down Expand Up @@ -91,6 +91,7 @@
import { AppSidebar, AppSidebarTab } from '@nextcloud/vue'
import { mapState } from 'vuex'
import { emit } from '@nextcloud/event-bus'
import { loadState } from '@nextcloud/initial-state'
import SidebarConfigurationIcon from 'vue-material-design-icons/Wrench.vue'
import SidebarOptionsIcon from 'vue-material-design-icons/FormatListChecks.vue'
import SidebarShareIcon from 'vue-material-design-icons/ShareVariant.vue'
Expand Down Expand Up @@ -125,6 +126,12 @@ export default {
},
},

data() {
return {
projectsEnabled: loadState('core', 'projects_enabled', false),
}
},

computed: {
...mapState({
poll: (state) => state.poll,
Expand Down