fix and refactor code
This commit is contained in:
@@ -84,10 +84,12 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, onMounted } from 'vue';
|
||||
import { useUserStore } from '../stores/user';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import AppLayout from '../components/Layout/AppLayout.vue';
|
||||
import AppLayout from '@/components/Layout/AppLayout.vue';
|
||||
import {useNotification} from "@/composables/useNotification";
|
||||
|
||||
const { showNotification } = useNotification();
|
||||
const userStore = useUserStore();
|
||||
const { t, locale } = useI18n();
|
||||
|
||||
@@ -129,7 +131,7 @@ async function saveProfile() {
|
||||
if (ok) {
|
||||
locale.value = form.language;
|
||||
showNotification('profile.updateSuccess', 'success');
|
||||
resetForm(); // очищаем поля пароля
|
||||
resetForm();
|
||||
} else {
|
||||
showNotification('profile.updateError', 'error');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user