diff --git a/lib/www/client/source/src/components/app-bar-extension-project.vue b/lib/www/client/source/src/components/app-bar-extension-project.vue
new file mode 100644
index 0000000..5ac8907
--- /dev/null
+++ b/lib/www/client/source/src/components/app-bar-extension-project.vue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
diff --git a/lib/www/client/source/src/components/navigation.vue b/lib/www/client/source/src/components/navigation.vue
index 2e0fdd8..cab76e1 100644
--- a/lib/www/client/source/src/components/navigation.vue
+++ b/lib/www/client/source/src/components/navigation.vue
@@ -71,17 +71,10 @@
-
-
-
-
-
+
+
@@ -95,24 +88,17 @@ export default {
data() {
return {
drawer: false,
- tabs: [
- { href: "summary", text: "Summary" },
- { href: "lines", text: "Lines" },
- { href: "plan", text: "Plan" },
- { href: "sequences", text: "Sequences" },
- { href: "calendar", text: "Calendar" },
- { href: "log", text: "Log" },
- { href: "qc", text: "QC" },
- { href: "graphs", text: "Graphs" },
- { href: "map", text: "Map" }
- ],
path: []
};
},
computed: {
- tab () {
- return this.tabs.findIndex(t => t.href == this.$route.path.split(/\/+/)[3]);
+
+ appBarExtension () {
+ return this.$route.matched
+ .filter(i => i.meta?.appBarExtension)
+ .map(i => i.meta.appBarExtension)
+ .pop()?.component;
},
...mapGetters(['user', 'loading'])
@@ -131,9 +117,6 @@ export default {
},
methods: {
- tabLink (href) {
- return `/projects/${this.$route.params.project}/${href}`;
- },
breadcrumbs () {
this.path = this.$route.matched
diff --git a/lib/www/client/source/src/router/index.js b/lib/www/client/source/src/router/index.js
index 7acf5d3..199eae7 100644
--- a/lib/www/client/source/src/router/index.js
+++ b/lib/www/client/source/src/router/index.js
@@ -16,7 +16,7 @@ import Log from '../views/Log.vue'
import QC from '../views/QC.vue'
import Graphs from '../views/Graphs.vue'
import Map from '../views/Map.vue'
-
+import DougalAppBarExtensionProject from '../components/app-bar-extension-project'
Vue.use(VueRouter)
@@ -100,7 +100,10 @@ Vue.use(VueRouter)
text: (ctx) => ctx.$store.state.project.projectName || "…",
href: (ctx) => `/projects/${ctx.$store.state.project.projectId || ctx.$route.params.project || ""}/`
}
- ]
+ ],
+ appBarExtension: {
+ component: DougalAppBarExtensionProject
+ }
},
children: [
{