From 81c3ab0fc6b0728e3705104e1346d9b10b6f35e7 Mon Sep 17 00:00:00 2001 From: Alexander Trost Date: Thu, 30 Jan 2025 13:37:50 +0100 Subject: [PATCH] fix: use game unemployed job to hide/show char job grade info Signed-off-by: Alexander Trost --- app/app.vue | 15 ++++++--------- app/components/citizens/info/CitizenInfo.vue | 2 +- .../jobs/colleagues/ColleagueInfoPopover.vue | 6 +++++- app/components/jobs/colleagues/ColleaguesList.vue | 14 ++++++++++---- .../jobs/colleagues/info/ColleagueInfo.vue | 10 ++++++---- .../jobs/timeclock/TimeclockInactiveList.vue | 8 ++++++-- app/components/jobs/timeclock/TimeclockList.vue | 5 ++++- app/components/partials/LanguageSwitcherModal.vue | 4 ++-- app/store/settings.ts | 2 +- nuxt.config.ts | 3 ++- 10 files changed, 43 insertions(+), 26 deletions(-) diff --git a/app/app.vue b/app/app.vue index 22343bae6..c653f5530 100644 --- a/app/app.vue +++ b/app/app.vue @@ -22,12 +22,7 @@ useHead({ lang: 'en', }, meta: [{ key: 'theme-color', name: 'theme-color', content: color }], - titleTemplate: (title?: string) => { - if (title?.includes('.')) { - title = t(title); - } - return title ? `${title} - FiveNet` : 'FiveNet'; - }, + titleTemplate: (title?: string) => (title ? `${title?.includes('.') ? t(title) : title} - FiveNet` : 'FiveNet'), }); useSeoMeta({ @@ -82,12 +77,14 @@ async function clickListener(event: MouseEvent): Promise { }); } -onBeforeMount(async () => { +async function setUserLocale(): Promise { logger.info('Setting user locale to', userLocale.value); - if (userLocale.value !== null) { + if (userLocale.value !== undefined) { await setLocale(userLocale.value); } -}); +} +setUserLocale(); +watch(userLocale, () => setUserLocale()); onMounted(async () => { if (!import.meta.client) { diff --git a/app/components/citizens/info/CitizenInfo.vue b/app/components/citizens/info/CitizenInfo.vue index a799877b8..54b17ab5a 100644 --- a/app/components/citizens/info/CitizenInfo.vue +++ b/app/components/citizens/info/CitizenInfo.vue @@ -171,7 +171,7 @@ const isOpen = ref(false);
{{ user.jobLabel }} -