Implement 404 handling
This commit is contained in:
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -10,6 +10,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
<script type="module" src="/src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
17
src/pages/404Page.vue
Normal file
17
src/pages/404Page.vue
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<Navbar />
|
||||||
|
<h1>404</h1>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Navbar from '../components/Navbar.vue'
|
||||||
|
export default {
|
||||||
|
name: "404Page",
|
||||||
|
components: {
|
||||||
|
Navbar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
@ -46,11 +46,10 @@
|
|||||||
<label class="form-check-label" for="showNotYetRunning">Show Not-Yet Running Trains</label>
|
<label class="form-check-label" for="showNotYetRunning">Show Not-Yet Running Trains</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button v-if="store.loggedIn" @click="postPreferences()">Save Preferences</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button v-if="store.loggedIn" @click="postPreferences()">Save Preferences</button>
|
|
||||||
|
|
||||||
<transition id="sidebar" name="slideLeft">
|
<transition id="sidebar" name="slideLeft">
|
||||||
<div v-if="store.displaySelectedTrain && store.selectedTrain">
|
<div v-if="store.displaySelectedTrain && store.selectedTrain">
|
||||||
<TrainSidebar />
|
<TrainSidebar />
|
||||||
@ -485,11 +484,11 @@ export default {
|
|||||||
height: 19px;
|
height: 19px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
#dropdownMenuButton1{
|
#dropdownMenuButton1 {
|
||||||
box-shadow: 0 0 5px 2px #6e757dbe;
|
box-shadow: 0 0 5px 2px #6e757dbe;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dropMenu{
|
#dropMenu {
|
||||||
/*In case we want to edit dropdown menu*/
|
/*In case we want to edit dropdown menu*/
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
@ -502,7 +501,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#sidebar{
|
#sidebar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 80%;
|
height: 80%;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
@ -523,7 +522,7 @@ export default {
|
|||||||
transition: all 0.8s;
|
transition: all 0.8s;
|
||||||
|
|
||||||
}
|
}
|
||||||
.slideLeft-enter-from, .slideLeft-leave-to{
|
.slideLeft-enter-from, .slideLeft-leave-to {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateX(-100px);
|
transform: translateX(-100px);
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,11 @@ function loadPage(component) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{path: "/", component:loadPage("MapPage")},
|
{ path: "/", component:loadPage("MapPage") },
|
||||||
{path: "/insights", component:loadPage("InsightsPage")},
|
{ path: "/insights", component:loadPage("InsightsPage") },
|
||||||
{path: "/account", component:loadPage('AccountPage'), beforeEnter: isAuth},
|
{ path: "/account", component:loadPage('AccountPage'), beforeEnter: isAuth },
|
||||||
{path: "/signup", component:loadPage('SignUpPage')},
|
{ path: "/signup", component:loadPage('SignUpPage') },
|
||||||
{path: "/login", component:loadPage('LoginPage')},
|
{ path: "/login", component:loadPage('LoginPage') },
|
||||||
|
{ path: "/404", component:loadPage('404Page') },
|
||||||
|
{ path: "/:catchAll(.*)", component:loadPage('404Page') }
|
||||||
]
|
]
|
Reference in New Issue
Block a user