diff --git a/client/components/App.vue b/client/components/App.vue index 999f1ac8..59b3d77d 100644 --- a/client/components/App.vue +++ b/client/components/App.vue @@ -3,32 +3,32 @@
- - + + - Картотека + Картотека - + Читалка - + Форум-чат - + Поступления - + Источники - + Параметры - + Справка @@ -70,10 +70,6 @@ class App extends Vue { }); } - handleSelect(key, keyPath) { - console.log(key, keyPath); - } - toggleCollapse() { this.commit('uistate/setAsideBarCollapse', !this.uistate.asideBarCollapse); } @@ -108,6 +104,14 @@ class App extends Vue { get apiError() { return this.state.apiError; } + + get rootRoute() { + const m = this.$route.path.match(/^(\/[^\/]*).*$/i); + if (m) + return m[1]; + else + return this.$route.path; + } } //----------------------------------------------------------------------------- diff --git a/client/components/NotFound404/NotFound404.vue b/client/components/NotFound404/NotFound404.vue new file mode 100644 index 00000000..3ba5df9c --- /dev/null +++ b/client/components/NotFound404/NotFound404.vue @@ -0,0 +1,20 @@ + + + diff --git a/client/router.js b/client/router.js index 29aae2be..7f7c167d 100644 --- a/client/router.js +++ b/client/router.js @@ -8,6 +8,7 @@ import Income from './components/Income/Income.vue'; import Sources from './components/Sources/Sources.vue'; import Settings from './components/Settings/Settings.vue'; import Help from './components/Help/Help.vue'; +import NotFound404 from './components/NotFound404/NotFound404.vue'; Vue.use(VueRouter); @@ -19,6 +20,7 @@ let routes = [ { path: '/sources', component: Sources }, { path: '/settings', component: Settings }, { path: '/help', component: Help }, + { path: '*', component: NotFound404 }, ]; export default new VueRouter({