From eff74eef96ca104a6a7dc5420e9f8f379bb127b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20B=C3=A4r?= Date: Mon, 3 Jun 2019 14:09:47 +0200 Subject: [PATCH] Shared: Page Sub Nav added --- navigation/BreadcrumbNav.vue | 10 ++--- navigation/PageSubNav.vue | 82 ++++++++++++++++++++++++++++++++++++ navigation/UserNav.vue | 12 +++++- 3 files changed, 97 insertions(+), 7 deletions(-) create mode 100644 navigation/PageSubNav.vue diff --git a/navigation/BreadcrumbNav.vue b/navigation/BreadcrumbNav.vue index 3f60fff..9b3511b 100644 --- a/navigation/BreadcrumbNav.vue +++ b/navigation/BreadcrumbNav.vue @@ -61,11 +61,11 @@ if (this.$route.name === 'documents.edit') { bc.push({ label: this.$route.params.asset }) } - const b = this.$route.name.split('.') - if (b.length === 3) { - const s = b[2] - if (!this.excludeTermns.includes(s)) bc.push({ label: this.toProperCase(b[2]) }) - } + // const b = this.$route.name.split('.') + // if (b.length === 3) { + // const s = b[2] + // if (!this.excludeTermns.includes(s)) bc.push({ label: this.toProperCase(b[2]) }) + // } return bc } }, diff --git a/navigation/PageSubNav.vue b/navigation/PageSubNav.vue new file mode 100644 index 0000000..1e1cd41 --- /dev/null +++ b/navigation/PageSubNav.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/navigation/UserNav.vue b/navigation/UserNav.vue index 88604a1..8b0a1bf 100644 --- a/navigation/UserNav.vue +++ b/navigation/UserNav.vue @@ -8,8 +8,9 @@ // menu button q-btn(@click="handlerMenuDrawer", icon="menu", flat) - - breadcrumb-nav(:timeline="timeline", :videoMetadata="videoMetadata", :grid="grid") + q-toolbar-title + breadcrumb-nav(:timeline="timeline", :videoMetadata="videoMetadata", :grid="grid") + page-sub-nav(v-if="getSubNavType()", :type="getSubNavType()") // drawer q-layout-drawer.bg-dark(v-model="menuDrawer", content-class="bg-dark", overlay) @@ -31,9 +32,11 @@ import ButtonList from './ButtonList' import BreadcrumbNav from './BreadcrumbNav' + import PageSubNav from './PageSubNav' export default { components: { + PageSubNav, BreadcrumbNav, ButtonList }, @@ -360,6 +363,11 @@ } }, methods: { + getSubNavType () { + if (this.timeline && !this.videoMetadata) return 'timeline' + else if (this.videoMetadata) return 'video' + else return undefined + }, checkRoute (route) { this.timeline = undefined this.videoMetadata = undefined -- GitLab