diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-08-18 05:08:19 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2022-09-18 00:39:21 +0300 |
commit | fb38f8c958558567a3ce39d325a9811e39279563 (patch) | |
tree | 6f8ac9d8fd8aab31ef12cd2f2884eabb50445872 | |
parent | 7027be751a2edfaaa3a97d918d5df8b625841db1 (diff) |
Hide deprecated projects in sidebar by defaultenh/hide-projects-4.0
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r-- | src/js/views/SideBar.vue | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/js/views/SideBar.vue b/src/js/views/SideBar.vue index 3a0caba1..e05c01b7 100644 --- a/src/js/views/SideBar.vue +++ b/src/js/views/SideBar.vue @@ -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')"> @@ -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' @@ -125,6 +126,12 @@ export default { }, }, + data() { + return { + projectsEnabled: loadState('core', 'projects_enabled', false), + } + }, + computed: { ...mapState({ poll: (state) => state.poll, |