Refactor code structure for improved readability and maintainability

This commit is contained in:
2025-12-30 21:27:20 +07:00
parent 391acd574b
commit f35f281cb6
3 changed files with 984 additions and 983 deletions

View File

@@ -9,6 +9,10 @@ const { updateProfile } = useUserStore();
const platform = usePlatform();
const { checkAndPromptUpdate } = useAppUpdate();
onBeforeMount(() => {
loadSavedLanguage();
});
onMounted(() => {
if (!isAuthenticated.value)
return;
@@ -26,10 +30,6 @@ onMounted(() => {
}
});
onBeforeMount(() => {
loadSavedLanguage();
});
watch(locale, (newLocale) => {
document.querySelector("html")?.setAttribute("lang", newLocale);
}, { immediate: true });