Hide Header and Footer on minimal and login view

This commit is contained in:
Alicia Sykes 2021-08-08 17:15:01 +01:00
parent 64ef03036e
commit e7105bc9b9
2 changed files with 17 additions and 3 deletions

View File

@ -1,8 +1,8 @@
<template>
<!-- User Footer -->
<footer v-if="text && text !== ''" v-html="text"></footer>
<footer v-if="text && text !== '' && visible" v-html="text"></footer>
<!-- Default Footer -->
<footer v-else>
<footer v-else-if="visible">
Developed by <a :href="authorUrl">{{authorName}}</a>.
Licensed under <a :href="licenseUrl">{{license}}</a>
{{ showCopyright? '©': '' }} {{date}}.
@ -11,6 +11,9 @@
</template>
<script>
import { shouldBeVisible } from '@/utils/MiscHelpers';
export default {
name: 'Footer',
props: {
@ -23,6 +26,11 @@ export default {
showCopyright: { type: Boolean, default: true },
repoUrl: { type: String, default: 'https://github.com/lissy93/dashy' },
},
computed: {
visible() {
return shouldBeVisible(this.$route.name);
},
},
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<header>
<header v-if="visible">
<PageTitle
v-if="titleVisible"
:title="pageInfo.title"
@ -14,6 +14,7 @@
import PageTitle from '@/components/PageStrcture/PageTitle.vue';
import Nav from '@/components/PageStrcture/Nav.vue';
import { visibleComponents as defaultVisibleComponents } from '@/utils/defaults';
import { shouldBeVisible } from '@/utils/MiscHelpers';
export default {
name: 'Header',
@ -31,6 +32,11 @@ export default {
navVisible: (this.visibleComponents || defaultVisibleComponents).navigation,
};
},
computed: {
visible() {
return shouldBeVisible(this.$route.name);
},
},
};
</script>