From dce33d20885f8922efcde119fa52ebbf1892128e Mon Sep 17 00:00:00 2001 From: Settel Date: Fri, 30 Sep 2022 08:43:40 +0200 Subject: [PATCH] bugfix: set ui language according to game language --- client/src/composables/useAuth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/composables/useAuth.ts b/client/src/composables/useAuth.ts index 0af94c9..2b8be60 100644 --- a/client/src/composables/useAuth.ts +++ b/client/src/composables/useAuth.ts @@ -1,5 +1,5 @@ -import { navigateTo } from "#app" import { useUserinfoStore, Userinfo } from "@/stores/UserinfoStore" +import useI18n from "./useI18n" import { $fetch } from 'ohmyfetch' export type AllowRole = '' | 'player' | 'gamemaster' | 'admin' @@ -19,6 +19,7 @@ export default (): useAuth => { try { const userInfo = await $fetch('/api/userinfo') as Userinfo user.setUserInfo(userInfo) + useI18n({}).setLang(userInfo.lang) if (allowRoles.indexOf(userInfo.role) >= 0 ) { return }