diff --git a/src/pages/Account/AccountConfig.vue b/src/pages/Account/AccountConfig.vue index 7f1694ae..ebab7e47 100644 --- a/src/pages/Account/AccountConfig.vue +++ b/src/pages/Account/AccountConfig.vue @@ -15,6 +15,7 @@ const { t } = useI18n(); const jApi = inject('jApi'); const appStore = useAppStore(); const { isHeaderMounted } = storeToRefs(appStore); +const { user } = storeToRefs(userStore); const vnFormRef = ref(null); const vnFormRef2 = ref(null); @@ -43,6 +44,15 @@ const fetchLanguagesSql = async () => { } }; +const updateUserNickname = async nickname => { + try { + await vnFormRef.value.submit(); + user.value.nickname = nickname; + } catch (error) { + console.error(error); + } +}; + onMounted(() => fetchLanguagesSql()); @@ -90,8 +100,8 @@ onMounted(() => fetchLanguagesSql());