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
f47fb860
Commit
f47fb860
authored
11 months ago
by
Anders Høvik
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Change from a-links to router-links in menubar
parent
f2a3e968
No related branches found
No related tags found
2 merge requests
!54
Fix/menu bug
,
!51
Fix/menu bug
Pipeline
#280574
failed
11 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/Menu.vue
+26
-27
26 additions, 27 deletions
src/components/BaseComponents/Menu.vue
with
26 additions
and
27 deletions
src/components/BaseComponents/Menu.vue
+
26
−
27
View file @
f47fb860
...
...
@@ -13,20 +13,20 @@
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<ul
class=
"navbar-nav ms-auto mb-2 mb-lg-0 ui-menu"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link text-white"
href=
"#"
@
click=
"toSavingGoals
"
><img
src=
"@/assets/icons/saving.svg"
>
Saving goals
</
a
>
<router-link
class=
"nav-link text-white"
to=
"/roadmap
"
><img
src=
"@/assets/icons/saving.svg"
>
Saving goals
</
router-link
>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link text-white"
href=
"#"
@
click=
"toL
eaderboard"
><img
src=
"@/assets/icons/leaderboard.svg"
>
Leaderboard
</
a
>
<router-link
class=
"nav-link text-white"
to=
"/l
eaderboard"
><img
src=
"@/assets/icons/leaderboard.svg"
>
Leaderboard
</
router-link
>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link text-white"
href=
"#"
@
click=
"toN
ews"
><img
src=
"@/assets/icons/newsletter.svg"
>
News
</
a
>
<router-link
class=
"nav-link text-white"
to=
"/n
ews"
><img
src=
"@/assets/icons/newsletter.svg"
>
News
</
router-link
>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link text-white"
href=
"#"
@
click=
"toStore
"
><img
src=
"@/assets/icons/storefront.svg"
>
Store
</
a
>
<router-link
class=
"nav-link text-white"
to=
"/shop
"
><img
src=
"@/assets/icons/storefront.svg"
>
Store
</
router-link
>
</li>
<li
v-if=
"userStore.isLoggedIn"
class=
"nav-item dropdown"
>
<a
class=
"nav-link dropdown-toggle username-text text-white "
href=
"#"
role=
"button"
...
...
@@ -34,20 +34,19 @@
<img
src=
"@/assets/icons/person.svg"
>
{{
useUserInfoStore
().
firstname
}}
</a>
<ul
class=
"dropdown-menu dropdown-username-content"
>
<li><a
class=
"dropdown-item text-white dropdown-username-link"
href=
"#"
@
click=
"toUserProfile"
><img
src=
"@/assets/icons/person.svg"
>
User Profile
</a></li>
<li><a
class=
"dropdown-item text-white dropdown-username-link"
href=
"#"
@
click=
"toBudget"
>
Budget
</a></li>
<li><a
class=
"dropdown-item text-white dropdown-username-link"
href=
"#"
@
click=
"toFriends"
><img
src=
"@/assets/icons/friends.svg"
>
Friends
</a></li>
<li><a
class=
"dropdown-item text-white dropdown-username-link"
href=
"#"
@
click=
"toSetting"
><img
src=
"@/assets/icons/settings.svg"
>
Setting
</a></li>
<li><a
class=
"dropdown-item text-white dropdown-username-link"
href=
"#"
@
click=
"toFeedback"
><img
src=
"@/assets/icons/feedback.svg"
>
Feedback
</a></li>
<li><a
class=
"dropdown-item text-white dropdown-username-link"
href=
"#"
@
click=
"toSetting"
><img
src=
"@/assets/icons/admin.svg"
>
Admin table
</a></li>
<li><a
class=
"dropdown-item text-white dropdown-username-link"
href=
"#"
@
click=
"toLogout"
data-testid=
"logout"
><img
src=
"@/assets/icons/logout.svg"
>
Log out
</a></li>
<li><router-link
class=
"dropdown-item text-white dropdown-username-link"
:to=
"toUserProfile()"
><img
src=
"@/assets/icons/person.svg"
>
User Profile
</router-link></li>
<li><router-link
class=
"dropdown-item text-white dropdown-username-link"
:to=
"toBudget()"
><img>
Budget
</router-link></li>
<li><router-link
class=
"dropdown-item text-white dropdown-username-link"
:to=
"toFriends()"
><img
src=
"@/assets/icons/friends.svg"
>
Friends
</router-link></li>
<li><router-link
class=
"dropdown-item text-white dropdown-username-link"
:to=
"toSetting()"
><img
src=
"@/assets/icons/settings.svg"
>
Settings
</router-link></li>
<li><router-link
class=
"dropdown-item text-white dropdown-username-link"
:to=
"toFeedback()"
><img
src=
"@/assets/icons/feedback.svg"
>
Feedback
</router-link></li>
<li><router-link
class=
"dropdown-item text-white dropdown-username-link"
:to=
"toSetting()"
><img
src=
"@/assets/icons/admin.svg"
>
Admin
</router-link></li>
<li><a
class=
"dropdown-item text-white dropdown-username-link"
ref=
"#"
@
click=
"toLogout()"
><img
src=
"@/assets/icons/logout.svg"
>
Log out
</a></li>
</ul>
</li>
<li
v-else
class=
"nav-item"
>
...
...
@@ -71,7 +70,7 @@ function toHome() {
}
function
toBudget
()
{
r
outer
.
push
(
'
/budget-overview
'
)
r
eturn
'
/budget-overview
'
}
function
toSavingGoals
()
{
...
...
@@ -91,19 +90,19 @@ function toStore() {
}
function
toSetting
()
{
r
outer
.
push
(
'
/settings/profile
'
)
r
eturn
'
/settings/profile
'
}
function
toFeedback
()
{
r
outer
.
push
(
'
/feedback
'
)
r
eturn
'
/feedback
'
}
function
toFriends
()
{
r
outer
.
push
(
'
/friends
'
)
r
eturn
'
/friends
'
}
function
toUserProfile
()
{
router
.
push
(
'
/profile
'
)
return
'
/profile
'
}
function
toLogout
()
{
...
...
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