Skip to content

Commit

Permalink
feat(ui): NotFound view
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 12, 2018
1 parent 1d9a4d6 commit 11bb249
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/@vue/cli-ui/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import ProjectTasks from './views/ProjectTasks.vue'
import ProjectTaskDetails from './views/ProjectTaskDetails.vue'
import ProjectSelect from './views/ProjectSelect.vue'
import ProjectCreate from './views/ProjectCreate.vue'
import About from './views/About.vue'
import FileDiffView from './components/FileDiffView.vue'
import About from './views/About.vue'
import NotFound from './views/NotFound.vue'

import PROJECT_CURRENT from './graphql/projectCurrent.gql'

Expand Down Expand Up @@ -90,6 +91,16 @@ const router = new Router({
path: '/about',
name: 'about',
component: About
},
{
path: '/home',
name: 'home',
redirect: { name: 'project-home' }
},
{
path: '*',
name: 'not-found',
component: NotFound
}
]
})
Expand Down
19 changes: 19 additions & 0 deletions packages/@vue/cli-ui/src/views/NotFound.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<div class="not-found page">
<VueIcon icon="pets" class="huge"/>
<h1 class="title">View not found</h1>
<VueButton :to="{ name: 'home' }">Go home</VueButton>
</div>
</template>

<style lang="stylus" scoped>
@import "~@/style/imports"
.not-found
v-box()
box-center()
height 100%
.title
margin $padding-item 0
</style>

0 comments on commit 11bb249

Please sign in to comment.