Skip to content
Snippets Groups Projects
Commit 34df13bc authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

refactor: rework footer

parent 30f7575b
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
<Home v-else :modules="modules" />
</div>
<AppFooter :modules="footerModules" />
<AppFooter />
</div>
</template>
......@@ -22,15 +22,6 @@ import { computedIter } from '@/util'
const { locale, t } = useI18n()
const authStore = useAuthStore()
const footerModules = computedIter(function* () {
if (authStore.isSuperuser) {
yield {
slug: 'settings',
title: t('navigation.settings'),
}
}
})
const modules = computedIter(function* () {
if (authStore.currentUser) {
yield {
......
<template>
<footer class="tw-p-2 tw-bg-gray-800">
<b-container>
<b-row>
<b-col>
aura/<b>dashboard</b> v{{ version }}
<span v-for="mod in modules" :key="mod.slug">
|
<router-link :to="mod.slug">
{{ mod.title }}
</router-link>
</span>
|
<router-link to="/credits"> Credits </router-link>
</b-col>
<b-col align="right">
{{ $t('footer.tagline') }}
</b-col>
</b-row>
</b-container>
<footer class="tw-p-2 tw-bg-gray-800 tw-text-white/50">
<div class="container tw-flex tw-gap-2">
<div class="tw-flex tw-gap-2 tw-mr-auto">
<span> aura/<b>dashboard</b> v{{ version }}</span>
<template v-if="authStore.isSuperuser">
<span>|</span>
<router-link :to="{ name: 'settings' }">{{ t('navigation.settings') }}</router-link>
</template>
<span>|</span>
<router-link :to="{ name: 'credits' }">Credits</router-link>
</div>
{{ t('footer.tagline') }}
</div>
</footer>
</template>
<script>
export default {
props: {
modules: {
type: Array,
required: true,
},
},
computed: {
version() {
return import.meta.env.VUE_APP_VERSION
},
},
}
</script>
<script lang="ts" setup>
import { useI18n } from '@/i18n'
import { useAuthStore } from '@/stores/auth'
<style scoped>
footer {
border-top: 1px solid #2e3436;
color: rgba(255, 255, 255, 0.5);
width: 100%;
margin-top: auto;
}
</style>
const version = import.meta.env.VUE_APP_VERSION
const { t } = useI18n()
const authStore = useAuthStore()
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment