feat: 添加用户设置功能,支持修改昵称和邮箱,重构相关路由和组件
This commit is contained in:
17
src/App.vue
17
src/App.vue
@@ -1,12 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
const { initializeWallet } = useWalletStore();
|
||||
import { App as CapacitorApp } from "@capacitor/app";
|
||||
|
||||
const { isAuthenticated } = useAuth();
|
||||
const { locale, loadSavedLanguage } = useLanguage();
|
||||
|
||||
loadSavedLanguage();
|
||||
|
||||
onMounted(() => {
|
||||
initializeWallet();
|
||||
console.log("App mounted successfully");
|
||||
CapacitorApp.addListener("appStateChange", async ({ isActive }) => {
|
||||
if (isActive && isAuthenticated.value) {
|
||||
await userStore.updateProfile();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
onBeforeMount(() => {
|
||||
loadSavedLanguage();
|
||||
});
|
||||
|
||||
watch(locale, (newLocale) => {
|
||||
|
||||
Reference in New Issue
Block a user