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
f28da886
Commit
f28da886
authored
10 months ago
by
Anders Høvik
Browse files
Options
Downloads
Patches
Plain Diff
Added images to notification
parent
873d95a3
No related branches found
Branches containing commit
No related tags found
1 merge request
!59
Feature/inbox
Pipeline
#281734
passed with warnings
10 months ago
Stage: install
Stage: build
Stage: test
Stage: lint
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/assets/icons/medal.png
+0
-0
0 additions, 0 deletions
src/assets/icons/medal.png
src/components/BaseComponents/Menu.vue
+21
-4
21 additions, 4 deletions
src/components/BaseComponents/Menu.vue
with
21 additions
and
4 deletions
src/assets/icons/medal.png
0 → 100644
+
0
−
0
View file @
f28da886
28.1 KiB
This diff is collapsed.
Click to expand it.
src/components/BaseComponents/Menu.vue
+
21
−
4
View file @
f28da886
...
...
@@ -36,7 +36,22 @@
</a>
<ul
class=
"dropdown-menu"
aria-labelledby=
"navbarDropdownMenuLink"
>
<li
v-for=
"(array,key) in notifMap"
:key=
"key"
>
<router-link
class=
"not-item dropdown-item text-white"
:to=
"getPath(array[1][0])"
>
{{
array
[
1
][
1
]
}}
</router-link>
<div
class=
"d-flex align-items-center"
>
<div
v-if=
"array[1][0] === '1'"
class=
"flex-shrink-0"
>
<img
src=
"/src/assets/icons/medal.png"
alt=
"Notification Icon"
class=
"notification-icon"
style=
"height: 20px; width: 20px"
>
</div>
<div
v-if=
"array[1][0] === '2'"
class=
"flex-shrink-0"
>
<img
src=
"/src/assets/userprofile.png"
alt=
"Notification Icon"
class=
"notification-icon"
style=
"height: 20px; width: 20px"
>
</div>
<div
v-if=
"array[1][0] === '3'"
class=
"flex-shrink-0"
>
<img
src=
"/src/assets/icons/piggybank.svg"
alt=
"Notification Icon"
class=
"notification-icon"
style=
"height: 20px; width: 20px"
>
</div>
<div
class=
"flex-grow-1 ms-3"
>
<router-link
class=
"not-item dropdown-item text-white"
:to=
"getPath(array[1][0])"
>
{{
array
[
1
][
1
]
}}
</router-link>
</div>
</div>
</li>
</ul>
</li>
...
...
@@ -111,9 +126,9 @@ let path = ref('#');
function
getNotification
(){
//axios call
let
response
=
ref
(
[
'
1
'
,
'
You have recived a award for getting 200 points
'
])
let
response2
=
ref
(
[
'
2
'
,
'
You have recived a friend request from Jens Aanestad
'
])
let
response3
=
ref
(
[
'
3
'
,
'
You have lost your streak. Come back to try again
'
])
let
response
:
any
=
ref
(
[
'
1
'
,
'
You have recived a award for getting 200 points
'
])
let
response2
:
any
=
ref
(
[
'
2
'
,
'
You have recived a friend request from Jens Aanestad
'
])
let
response3
:
any
=
ref
(
[
'
3
'
,
'
You have lost your streak. Come back to try again
'
])
notifMap
.
value
.
set
(
notifId
.
value
,
response
.
value
)
notifId
.
value
++
notifMap
.
value
.
set
(
notifId
.
value
,
response2
.
value
)
...
...
@@ -135,6 +150,8 @@ function getPath(id : string){
if
(
id
===
'
3
'
){
return
path
.
value
=
'
/roadmap
'
}
return
'
#
'
;
}
function
removeNotification
()
{
...
...
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