Support link-modules and add docs link (#368)

* Allow link type modules

* Add docs module

* Allow buttons to render as <a>

* Update button readme

* Use link buttons in module sidebar when needed
This commit is contained in:
Rijk van Zanten
2020-04-09 10:23:07 -04:00
committed by GitHub
parent f2034f7ade
commit 7a2ee0215f
9 changed files with 55 additions and 16 deletions

View File

@@ -2,7 +2,15 @@
<div class="module-bar">
<module-bar-logo />
<div class="modules">
<v-button v-for="module in _modules" :key="module.id" icon x-large :to="module.to" tile>
<v-button
v-for="module in _modules"
:key="module.id"
icon
x-large
:to="module.to"
:href="module.href"
tile
>
<v-icon :name="module.icon" />
</v-button>
</div>
@@ -29,7 +37,8 @@ export default defineComponent({
const _modules = modules
.map((module) => ({
...module,
to: `/${currentProjectKey}/${module.id}/`,
href: module.link || null,
to: module.link === undefined ? `/${currentProjectKey}/${module.id}/` : null,
}))
.filter((module) => {
if (module.hidden !== undefined) {