mirror of https://github.com/Lissy93/dashy.git
✨ Hide Header and Footer on minimal and login view
This commit is contained in:
parent
64ef03036e
commit
e7105bc9b9
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue