Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
refactor: navbar links
Browse files Browse the repository at this point in the history
  • Loading branch information
tassiluca committed Feb 1, 2024
1 parent 8b2ad11 commit 3a905a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 2 additions & 0 deletions docs/report-asw/report.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,8 @@ \subsection{API Testing}

\section{Deployment}

\todo{Add file secrets for mailer}

\subsection{Prerequisites}

\begin{itemize}
Expand Down
21 changes: 13 additions & 8 deletions frontend/src/components/NavbarComponent.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<script setup lang="ts">
import { library } from "@fortawesome/fontawesome-svg-core";
import { faEnvelope, faBars, faUser, faRightToBracket, faRightFromBracket, faEnvelopeOpen, faEnvelopeOpenText } from "@fortawesome/free-solid-svg-icons";
import { useAuthStore } from "@/stores/auth";
import { useNotificationsStore } from '@/stores/notificationsStore'
import {library} from "@fortawesome/fontawesome-svg-core";
import {
faBars,
faEnvelope,
faEnvelopeOpen,
faEnvelopeOpenText,
faRightFromBracket,
faRightToBracket,
faUser
} from "@fortawesome/free-solid-svg-icons";
import {useAuthStore} from "@/stores/auth";
import {useNotificationsStore} from '@/stores/notificationsStore'
import {Role} from "@/commons/utils";
const authStore = useAuthStore();
Expand Down Expand Up @@ -35,15 +43,12 @@ library.add(faEnvelope, faEnvelopeOpen, faEnvelopeOpenText, faBars, faUser, faRi
</a>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mx-auto">
<li class="nav-item">
<li class="nav-item" v-if="authStore.isLogged && authStore.userRole == Role.User">
<a class="nav-link active" aria-current="page" href="/">Home</a>
</li>
<li v-if="authStore.isLogged" class="nav-item">
<a class="nav-link" href="/dashboard">Dashboard</a>
</li>
<li v-if="authStore.isLogged" class="nav-item">
<a class="nav-link" href="/elections">Elections</a>
</li>
<li v-if="authStore.isLogged && authStore.userRole === Role.Admin" class="nav-item">
<a class="nav-link" href="/elections/create">Create election</a>
</li>
Expand Down

0 comments on commit 3a905a7

Please sign in to comment.