fix: show public/pinned views if exist

This commit is contained in:
Shariq Ansari 2024-02-04 23:46:18 +05:30
parent 830c6de37e
commit 6aa2cbe692

View File

@ -27,7 +27,7 @@
/> />
<div <div
v-else-if="notificationsStore().unreadNotificationsCount" v-else-if="notificationsStore().unreadNotificationsCount"
class="absolute z-20 top-1 -left-1.5 h-[5px] w-[5px] ring-1 ring-white translate-x-6 translate-y-1 rounded-full bg-gray-800" class="absolute -left-1.5 top-1 z-20 h-[5px] w-[5px] translate-x-6 translate-y-1 rounded-full bg-gray-800 ring-1 ring-white"
/> />
</template> </template>
</SidebarLink> </SidebarLink>
@ -165,24 +165,30 @@ const links = [
] ]
const allViews = computed(() => { const allViews = computed(() => {
return [ let _views = [
{ {
name: 'All Views', name: 'All Views',
hideLabel: true, hideLabel: true,
opened: true, opened: true,
views: links, views: links,
}, },
{ ]
if (getPublicViews().length) {
_views.push({
name: 'Public views', name: 'Public views',
opened: true, opened: true,
views: parseView(getPublicViews()), views: parseView(getPublicViews()),
}, })
{ }
if (getPinnedViews().length) {
_views.push({
name: 'Pinned views', name: 'Pinned views',
opened: true, opened: true,
views: parseView(getPinnedViews()), views: parseView(getPinnedViews()),
}, })
] }
return _views
}) })
function parseView(views) { function parseView(views) {