Adds ability for user to add custom nav bar links plus UI improvments

This commit is contained in:
Alicia Sykes
2021-05-18 15:22:11 +01:00
parent 265a8b42ba
commit 5353c3ab90
8 changed files with 117 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div id="dashy" data-theme="dark">
<Header :pageInfo="getPageInfo(pageInfo)" />
<Header :pageInfo="pageInfo" />
<router-view />
<Footer v-if="showFooter" :text="getFooterText()" />
</div>
@@ -19,10 +19,13 @@ export default {
Footer,
},
data: () => ({
pageInfo: conf.pageInfo || Defaults.pageInfo,
// pageInfo: this.getPageInfo(conf.pageInfo),
appConfig: conf.appConfig || Defaults.appConfig,
showFooter: Defaults.visibleComponents.footer,
}),
computed: {
pageInfo: function pi() { return this.getPageInfo(conf.pageInfo); },
},
methods: {
/* Returns either page info from the config, or default values */
getPageInfo(pageInfo) {
@@ -38,7 +41,8 @@ export default {
return {
title: localPageInfo.title || pageInfo.title || defaults.title,
description: localPageInfo.description || pageInfo.description || defaults.description,
navLinks: pageInfo.navLinks || defaults.navLinks,
navLinks: localPageInfo.navLinks || pageInfo.navLinks || defaults.navLinks,
footerText: localPageInfo.footerText || pageInfo.footerText || defaults.footerText,
};
}
return defaults;