Hide deprecated projects in sidebar by default

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2022-08-18 02:19:05 +00:00
parent f004c98610
commit 5c58560769
2 changed files with 6 additions and 2 deletions

View File

@ -96,7 +96,7 @@
<a class="button" :href="archivedFile" target="_blank"><span class="icon-files-dark" /> {{ t('bookmarks', 'Open file location') }}</a>
</div>
</AppSidebarTab>
<AppSidebarTab v-if="!isPublic"
<AppSidebarTab v-if="projectsEnabled && !isPublic"
id="bookmark-projects"
:name="t('bookmarks', 'Projects')"
icon="icon-projects"
@ -121,6 +121,7 @@ import { CollectionList } from 'nextcloud-vue-collections'
import { getCurrentUser } from '@nextcloud/auth'
import { generateRemoteUrl, generateUrl } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'
import humanizeDuration from 'humanize-duration'
import { actions, mutations } from '../store/'
@ -137,6 +138,7 @@ export default {
editingUrl: false,
activeTab: '',
showContentModal: false,
projectsEnabled: loadState('core', 'projects_enabled', false),
}
},
computed: {

View File

@ -112,7 +112,7 @@
</div>
</div>
</AppSidebarTab>
<AppSidebarTab v-if="!isPublic"
<AppSidebarTab v-if="projectsEnabled && !isPublic"
id="bookmark-projects"
:name="t('bookmarks', 'Projects')"
icon="icon-projects"
@ -136,6 +136,7 @@ import ActionSeparator from '@nextcloud/vue/dist/Components/ActionSeparator'
import UserBubble from '@nextcloud/vue/dist/Components/UserBubble'
import { getCurrentUser } from '@nextcloud/auth'
import { generateUrl, generateOcsUrl } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'
import axios from '@nextcloud/axios'
import copy from 'copy-text-to-clipboard'
import { actions, mutations } from '../store/'
@ -153,6 +154,7 @@ export default {
participant: null,
isSearching: false,
activeTab: '',
projectsEnabled: loadState('core', 'projects_enabled', false),
}
},
computed: {