From 6aa2cbe692e2eb075c00e1080b0c2d642dc5c27f Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Sun, 4 Feb 2024 23:46:18 +0530 Subject: [PATCH] fix: show public/pinned views if exist --- .../src/components/Layouts/AppSidebar.vue | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/Layouts/AppSidebar.vue b/frontend/src/components/Layouts/AppSidebar.vue index 615823ac..f25b6092 100644 --- a/frontend/src/components/Layouts/AppSidebar.vue +++ b/frontend/src/components/Layouts/AppSidebar.vue @@ -27,7 +27,7 @@ />
@@ -165,24 +165,30 @@ const links = [ ] const allViews = computed(() => { - return [ + let _views = [ { name: 'All Views', hideLabel: true, opened: true, views: links, }, - { + ] + if (getPublicViews().length) { + _views.push({ name: 'Public views', opened: true, views: parseView(getPublicViews()), - }, - { + }) + } + + if (getPinnedViews().length) { + _views.push({ name: 'Pinned views', opened: true, views: parseView(getPinnedViews()), - }, - ] + }) + } + return _views }) function parseView(views) {