Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/bookmarks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-08-18 05:19:05 +0300
committerChristopher Ng <chrng8@gmail.com>2022-08-18 05:19:05 +0300
commit5c58560769fd71308a54335ec3609c60e7f0dab3 (patch)
treeae7e52e08431d78884abb4ab656aa2c82e5c042a
parentf004c98610e2a20de6204236c735df96e52081f1 (diff)
Hide deprecated projects in sidebar by defaultenh/hide-projects
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r--src/components/SidebarBookmark.vue4
-rw-r--r--src/components/SidebarFolder.vue4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/SidebarBookmark.vue b/src/components/SidebarBookmark.vue
index d8b19895..03af53f2 100644
--- a/src/components/SidebarBookmark.vue
+++ b/src/components/SidebarBookmark.vue
@@ -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: {
diff --git a/src/components/SidebarFolder.vue b/src/components/SidebarFolder.vue
index 6a7d2e8c..930c2050 100644
--- a/src/components/SidebarFolder.vue
+++ b/src/components/SidebarFolder.vue
@@ -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: {