Remove version number from footer & About view if anon - Resolves #432

This commit is contained in:
Bubka 2025-02-26 16:55:36 +01:00
parent 530b1a5cf6
commit 4ef76e0ae9
2 changed files with 10 additions and 3 deletions

View File

@ -46,9 +46,11 @@
<div v-else class="content has-text-centered">
<div v-if="$route.meta.showAbout === true">
<!-- about link -->
<router-link id="lnkAbout" :to="{ name: 'about' }" class="has-text-grey">
2FAuth <span class="has-text-weight-bold">v{{ $2fauth.version }}</span>
<router-link v-if="$route.name != 'about'" id="lnkAbout" :to="{ name: 'about' }" class="has-text-grey">
<span v-if="user.isAuthenticated && $route.meta.watchedByKicker" class="has-text-weight-bold">2FAuth v{{ $2fauth.version }}</span>
<span v-else class="">{{ $t('commons.about') }}</span>
</router-link>
<span v-else>&nbsp;</span>
</div>
<!-- email + menu links -->
<div v-else-if="user.preferences.showEmailInFooter">

View File

@ -1,7 +1,9 @@
<script setup>
import { UseColorMode } from '@vueuse/components'
import { useUserStore } from '@/stores/user'
const $2fauth = inject('2fauth')
const user = useUserStore()
const router = useRouter()
const returnTo = router.options.history.state.back
</script>
@ -11,7 +13,10 @@
<UseColorMode v-slot="{ mode }">
<h1 class="title has-text-grey-dark">{{ $t('commons.about') }}</h1>
<p class="block">
<span :class="mode == 'dark' ? 'has-text-white':'has-text-black'"><span class="is-size-5">2FAuth</span> v{{ $2fauth.version }}</span>
<span :class="mode == 'dark' ? 'has-text-white':'has-text-black'">
<span class="is-size-5">2FAuth</span>
<span v-if="user.isAuthenticated"> v{{ $2fauth.version }}</span>
</span>
<br />
{{ $t('commons.2fauth_teaser')}}
</p>