From fb092c339252320bd235fb7eee0ea494953b8e5b Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Sun, 12 Apr 2020 00:55:43 +0200 Subject: [PATCH] 404 view --- zero.Web/App/Components/Tables/table.vue | 1 + zero.Web/App/Components/pagination.vue | 9 +- zero.Web/App/pages/notfound.vue | 139 +++++++++++++++++++++++ zero.Web/App/pages/pages/pages.vue | 9 +- zero.Web/App/pages/pages/recyclebin.vue | 11 ++ zero.Web/App/router.config.js | 28 +++-- zero.Web/Resources/tree.debug.json | 2 +- 7 files changed, 188 insertions(+), 11 deletions(-) create mode 100644 zero.Web/App/pages/notfound.vue create mode 100644 zero.Web/App/pages/pages/recyclebin.vue diff --git a/zero.Web/App/Components/Tables/table.vue b/zero.Web/App/Components/Tables/table.vue index aa74e7c5..bebc4caa 100644 --- a/zero.Web/App/Components/Tables/table.vue +++ b/zero.Web/App/Components/Tables/table.vue @@ -213,6 +213,7 @@ border-bottom: 1px solid var(--color-line-light); z-index: 3; background: var(--color-box); + box-shadow: inset 0 -3px 3px rgba(0,0,0,0.02); .ui-table-cell { diff --git a/zero.Web/App/Components/pagination.vue b/zero.Web/App/Components/pagination.vue index ad41165a..69a9efe4 100644 --- a/zero.Web/App/Components/pagination.vue +++ b/zero.Web/App/Components/pagination.vue @@ -1,6 +1,6 @@  @@ -85,4 +85,9 @@ opacity: 0; } } + + .ui-pagination-button[disabled] .ui-button-icon + { + color: var(--color-fg-light); + } \ No newline at end of file diff --git a/zero.Web/App/pages/notfound.vue b/zero.Web/App/pages/notfound.vue new file mode 100644 index 00000000..69942963 --- /dev/null +++ b/zero.Web/App/pages/notfound.vue @@ -0,0 +1,139 @@ + + + + + + \ No newline at end of file diff --git a/zero.Web/App/pages/pages/pages.vue b/zero.Web/App/pages/pages/pages.vue index 8f212d3b..8b9d1d42 100644 --- a/zero.Web/App/pages/pages/pages.vue +++ b/zero.Web/App/pages/pages/pages.vue @@ -46,7 +46,7 @@ computed: { isOverview() { - return !this.$route.params.id; + return !this.$route.params.id && this.$route.name !== 'recyclebin'; } }, @@ -96,6 +96,13 @@ item.url = { name: 'page', params: { id: item.id } + }; + + if (item.id === "recyclebin") + { + item.url = { + name: 'recyclebin' + }; } }); this.cache[key] = response; diff --git a/zero.Web/App/pages/pages/recyclebin.vue b/zero.Web/App/pages/pages/recyclebin.vue new file mode 100644 index 00000000..f329c2f8 --- /dev/null +++ b/zero.Web/App/pages/pages/recyclebin.vue @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/zero.Web/App/router.config.js b/zero.Web/App/router.config.js index 97ee86cf..1b6ec0a2 100644 --- a/zero.Web/App/router.config.js +++ b/zero.Web/App/router.config.js @@ -31,12 +31,22 @@ zero.sections.forEach(section => if (section.alias === 'pages') { - route.children = [{ - path: 'edit/:id', - props: true, - name: 'page', - component: () => import('zero/pages/' + section.alias + '/page') - }]; + route.children = [ + { + path: 'edit/:id', + props: true, + name: 'page', + component: () => import('zero/pages/' + section.alias + '/page') + }, + { + path: 'recyclebin', + name: 'recyclebin', + component: () => import('zero/pages/' + section.alias + '/recyclebin'), + meta: { + name: '@recyclebin.name' + } + } + ]; } if (section.children.length > 0) @@ -52,7 +62,7 @@ zero.sections.forEach(section => // add fallback route (this should probably by 404 page) -//routes.push({ path: '*', component: ViewDefault }); +routes.push({ path: '*', component: () => import('zero/pages/notfound') }); @@ -80,6 +90,10 @@ router.beforeEach((to, from, next) => { document.title = Localization.localize(to.meta.section.name) + ' - zero'; } + else if (to.meta.name) + { + document.title = Localization.localize(to.meta.name) + ' - zero'; + } else { document.title = 'zero'; diff --git a/zero.Web/Resources/tree.debug.json b/zero.Web/Resources/tree.debug.json index 0b14e6dd..2643fbf5 100644 --- a/zero.Web/Resources/tree.debug.json +++ b/zero.Web/Resources/tree.debug.json @@ -9,7 +9,7 @@ "hasChildren": true }, { - "id": "-99", + "id": "recyclebin", "parentId": null, "sort": 1000, "name": "@recyclebin.name",