Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106-2024-07
frontend
Commits
a1e9136c
Commit
a1e9136c
authored
10 months ago
by
Jens Christian Aanestad
Browse files
Options
Downloads
Plain Diff
Merge branch 'refactor/navbar' into 'main'
Refactor/navbar See merge request
!84
parents
4f7ee2e5
bdb617db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!84
Refactor/navbar
Pipeline
#283496
passed with warnings
10 months ago
Stage: install
Stage: build
Stage: test
Stage: lint
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/BaseComponents/NavBar.vue
+12
-15
12 additions, 15 deletions
src/components/BaseComponents/NavBar.vue
with
12 additions
and
15 deletions
src/components/BaseComponents/NavBar.vue
+
12
−
15
View file @
a1e9136c
...
...
@@ -56,22 +56,20 @@
</router-link>
</li>
</ul>
<ul
v-else
class=
"dropdown-menu"
aria-labelledby=
"navbarDropdownMenuLink"
>
<ul
v-else
-if=
"notificationListRef.length === 0"
class=
"dropdown-menu"
aria-labelledby=
"navbarDropdownMenuLink"
>
<li>
Ingen varslinger
</li>
</ul>
</li>
<li
v-if=
"userStore.isLoggedIn"
class=
"nav-item dropdown"
>
<a
data-cy=
"user"
:class=
"['nav-link', 'dropdown-toggle', 'username-text', 'text-white',
{ 'underline-active': !isAnyActivePage() }]"
href="#"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false">
<img
src=
"@/assets/icons/person.svg"
>
{{
useUserInfoStore
().
firstname
}}
</a>
data-cy=
"user"
:class=
"['nav-link', 'dropdown-toggle', 'username-text', 'text-white',
{ 'underline-active': !isAnyActivePage() }]"
href="#"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false">
<img
src=
"@/assets/icons/person.svg"
>
{{
useUserInfoStore
().
firstname
}}
</a>
<ul
class=
"dropdown-menu dropdown-username-content"
>
...
...
@@ -158,10 +156,7 @@
import
{
useRouter
,
useRoute
}
from
"
vue-router
"
;
import
{
useUserInfoStore
}
from
'
@/stores/UserStore
'
;
import
{
onMounted
,
ref
}
from
"
vue
"
;
import
{
type
NotificationDTO
,
NotificationService
}
from
'
@/api
'
import
{
afterWrite
}
from
'
@popperjs/core
'
import
{
BadgeService
,
type
NotificationDTO
,
NotificationService
}
from
'
@/api
'
const
router
=
useRouter
();
const
route
=
useRoute
();
...
...
@@ -206,8 +201,10 @@ const notificationPathMapper: any = {
"
BADGE
"
:
"
/profile
"
,
"
COMPLETED_GOAL
"
:
"
/roadmap
"
}
const
getNotifications
=
async
()
=>
{
try
{
await
BadgeService
.
updateUnlockedBadges
();
notificationListRef
.
value
=
await
NotificationService
.
getUnreadNotificationByUser
()
}
catch
(
error
)
{
notificationListRef
.
value
=
[]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment