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 @@ ...@@ -7,7 +7,7 @@
<Home v-else :modules="modules" /> <Home v-else :modules="modules" />
</div> </div>
<AppFooter :modules="footerModules" /> <AppFooter />
</div> </div>
</template> </template>
...@@ -22,15 +22,6 @@ import { computedIter } from '@/util' ...@@ -22,15 +22,6 @@ import { computedIter } from '@/util'
const { locale, t } = useI18n() const { locale, t } = useI18n()
const authStore = useAuthStore() const authStore = useAuthStore()
const footerModules = computedIter(function* () {
if (authStore.isSuperuser) {
yield {
slug: 'settings',
title: t('navigation.settings'),
}
}
})
const modules = computedIter(function* () { const modules = computedIter(function* () {
if (authStore.currentUser) { if (authStore.currentUser) {
yield { yield {
......
<template> <template>
<footer class="tw-p-2 tw-bg-gray-800"> <footer class="tw-p-2 tw-bg-gray-800 tw-text-white/50">
<b-container> <div class="container tw-flex tw-gap-2">
<b-row> <div class="tw-flex tw-gap-2 tw-mr-auto">
<b-col> <span> aura/<b>dashboard</b> v{{ version }}</span>
aura/<b>dashboard</b> v{{ version }} <template v-if="authStore.isSuperuser">
<span v-for="mod in modules" :key="mod.slug"> <span>|</span>
| <router-link :to="{ name: 'settings' }">{{ t('navigation.settings') }}</router-link>
<router-link :to="mod.slug"> </template>
{{ mod.title }} <span>|</span>
</router-link> <router-link :to="{ name: 'credits' }">Credits</router-link>
</span> </div>
{{ t('footer.tagline') }}
| </div>
<router-link to="/credits"> Credits </router-link>
</b-col>
<b-col align="right">
{{ $t('footer.tagline') }}
</b-col>
</b-row>
</b-container>
</footer> </footer>
</template> </template>
<script> <script lang="ts" setup>
export default { import { useI18n } from '@/i18n'
props: { import { useAuthStore } from '@/stores/auth'
modules: {
type: Array,
required: true,
},
},
computed: {
version() {
return import.meta.env.VUE_APP_VERSION
},
},
}
</script>
<style scoped> const version = import.meta.env.VUE_APP_VERSION
footer { const { t } = useI18n()
border-top: 1px solid #2e3436; const authStore = useAuthStore()
color: rgba(255, 255, 255, 0.5); </script>
width: 100%;
margin-top: auto;
}
</style>
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