Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boco-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
Container 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_2022_02
boco-frontend
Commits
03085a78
Commit
03085a78
authored
2 years ago
by
Håkon Eilertsen Røskaft
Browse files
Options
Downloads
Plain Diff
Merge branch '404-page' into 'main'
add path not found page See merge request
!108
parents
b45c5fe8
19ea65e6
No related branches found
No related tags found
1 merge request
!108
add path not found page
Pipeline
#180846
failed
2 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/router/index.js
+8
-0
8 additions, 0 deletions
src/router/index.js
src/views/NotFound.vue
+18
-0
18 additions, 0 deletions
src/views/NotFound.vue
with
26 additions
and
0 deletions
src/router/index.js
+
8
−
0
View file @
03085a78
import
store
from
"
@/store
"
;
import
{
createRouter
,
createWebHistory
}
from
"
vue-router
"
;
import
NotFound
from
"
@/views/NotFound.vue
"
;
/**
* Guards routes. If token is null, no user is logged in and only the
...
...
@@ -133,6 +134,8 @@ const routes = [
name
:
"
UserItems
"
,
component
:
()
=>
import
(
"
../views/UserProfileViews/UserItemsView.vue
"
),
},
// Make sure it's your last route definition
{
path
:
"
/:pathMatch(.*)*
"
,
name
:
"
not-found
"
,
component
:
NotFound
},
];
const
router
=
createRouter
({
...
...
@@ -140,4 +143,9 @@ const router = createRouter({
routes
,
});
router
.
resolve
({
name
:
"
not-found
"
,
params
:
{
pathMatch
:
[
"
not
"
,
"
found
"
]
},
}).
href
;
export
default
router
;
This diff is collapsed.
Click to expand it.
src/views/NotFound.vue
0 → 100644
+
18
−
0
View file @
03085a78
<
template
>
<div
class=
"flex place-content-center h-full p-8"
>
<div
class=
"bg-gray-300 p-8 rounded-2xl drop-shadow-xl"
>
<h1
class=
"text-primary-medium text-4xl"
>
Oisann!
</h1>
<p>
Her skjedde det visst en feil...
</p>
<p>
Lyst å gå tilbake til
<router-link
to=
"/"
class=
"underline"
>
start?
</router-link>
</p>
</div>
</div>
</
template
>
<
script
>
export
default
{};
</
script
>
<
style
></
style
>
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