feat: 添加用户设置功能,支持修改昵称和邮箱,重构相关路由和组件

This commit is contained in:
2025-12-21 01:11:53 +07:00
parent 2e42bbc278
commit a4034b6b78
22 changed files with 620 additions and 225 deletions

View File

@@ -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) => {