Skip to content

Commit

Permalink
feat(sidebar): add link to saved posts and backup
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Dec 17, 2023
1 parent 9fac671 commit 8754d60
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions components/layout/navigation/Sidebar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup>
import {
ArrowDownTrayIcon,
BookmarkIcon,
BuildingLibraryIcon,
Cog6ToothIcon,
HomeIcon,
Expand All @@ -11,6 +12,7 @@
} from '@heroicons/vue/24/outline'
const { value: isMenuActive, toggle: toggleMenu } = useMenu()
const { isPremium } = useUserData()
const navigation = [
{
Expand Down Expand Up @@ -90,7 +92,7 @@
<li
v-for="item in navigation"
:key="item.name"
class="-mx-2 space-y-1"
class="-mx-2"
>
<NuxtLink
:href="item.href"
Expand All @@ -107,7 +109,7 @@
</li>

<!-- Premium -->
<li class="-mx-2 space-y-1">
<li class="-mx-2">
<NuxtLink
class="focus-visible:focus-outline-util hover:hover-text-util hover:hover-bg-util group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6 underline decoration-primary-500 decoration-2 underline-offset-8"
exactActiveClass="bg-base-0/20 text-base-content-highlight"
Expand All @@ -118,6 +120,30 @@
</NuxtLink>
</li>

<template v-if="isPremium">
<li class="-mr-2 ml-6">
<NuxtLink
class="focus-visible:focus-outline-util hover:hover-text-util hover:hover-bg-util group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"
exactActiveClass="bg-base-0/20 text-base-content-highlight"
href="/premium/saved-posts"
>
<BookmarkIcon class="h-6 w-6 shrink-0 text-primary-500" />
Saved Posts
</NuxtLink>
</li>

<li class="-mr-2 ml-6">
<NuxtLink
class="focus-visible:focus-outline-util hover:hover-text-util hover:hover-bg-util group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"
exactActiveClass="bg-base-0/20 text-base-content-highlight"
href="/premium/backup"
>
<ArrowDownTrayIcon class="h-6 w-6 shrink-0 text-primary-500" />
Backup & Restore
</NuxtLink>
</li>
</template>

<!-- Bottom -->
<li class="flex flex-1 flex-col">
<!-- Dummy element to take space -->
Expand Down

0 comments on commit 8754d60

Please sign in to comment.