1
0

feat: make salutation i18n static

This commit is contained in:
Dominik Pschenitschni
2022-10-16 15:26:02 +02:00
parent ed56176f2d
commit c20de51a3c
4 changed files with 48 additions and 43 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="content has-text-centered">
<h2 v-if="userInfo">
{{ $t(welcome, {username: userInfo.name !== '' ? userInfo.name : userInfo.username}) }}!
{{ salutation }}
</h2>
<message variant="danger" v-if="deletionScheduledAt !== null" class="mb-4">
{{
@ -78,7 +78,8 @@ import {useNamespaceStore} from '@/stores/namespaces'
import {useAuthStore} from '@/stores/auth'
import {useTaskStore} from '@/stores/tasks'
const welcome = useDateTimeSalutation()
const username = computed(() => userInfo.name !== '' ? userInfo.name : userInfo.username)
const salutation = useDateTimeSalutation(username)
const baseStore = useBaseStore()
const authStore = useAuthStore()