diff --git a/CHANGELOG b/CHANGELOG index d67dac69529796ae0742b6673ede3981b51404b1..dd6aa44ca7dac81bdc27362452cc42c4ff3a7893 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ Changelog - Import: can now specify search template when querying import sources (#45) - Player: better handling of errors when fetching the audio file (#46) - Login form: now redirect to previous page after login (#2) +- 404: a decent 404 template, at least (#48) 0.2.4 (2017-12-14) diff --git a/front/src/components/PageNotFound.vue b/front/src/components/PageNotFound.vue new file mode 100644 index 0000000000000000000000000000000000000000..3b88a6921f05d69aa49a5c7a965e509c3725249a --- /dev/null +++ b/front/src/components/PageNotFound.vue @@ -0,0 +1,34 @@ +<template> + <div class="main pusher"> + <div class="ui vertical stripe segment"> + <div class="ui text container"> + <h1 class="ui huge header"> + <i class="warning icon"></i> + <div class="content"> + <strike>Whale</strike> Page not found! + </div> + </h1> + <p>We're sorry, the page you asked for does not exists.</p> + <p>Requested URL: <a :href="path">{{ path }}</a></p> + <router-link class="ui icon button" to="/"> + Go to home page + <i class="right arrow icon"></i> + </router-link> + </div> + </div> + </div> +</template> + +<script> +export default { + data: function () { + return { + path: window.location.href + } + } +} +</script> + +<!-- Add "scoped" attribute to limit CSS to this component only --> +<style scoped> +</style> diff --git a/front/src/router/index.js b/front/src/router/index.js index e3d008f5864c691f34fd3d786cdbb5e653a0efd4..d727276fc7b58f58d288bf4ae42282341cc65ce4 100644 --- a/front/src/router/index.js +++ b/front/src/router/index.js @@ -1,5 +1,6 @@ import Vue from 'vue' import Router from 'vue-router' +import PageNotFound from '@/components/PageNotFound' import Home from '@/components/Home' import Login from '@/components/auth/Login' import Profile from '@/components/auth/Profile' @@ -72,7 +73,7 @@ export default new Router({ }, { path: 'import/batches/:id', name: 'library.import.batches.detail', component: BatchDetail, props: true } ] - } - + }, + { path: '*', component: PageNotFound } ] })