feat: 更新邮箱验证逻辑,添加用户姓名字段,优化组件交互

This commit is contained in:
2025-12-12 02:17:35 +07:00
parent 8d6e1b3835
commit 2050184075
7 changed files with 59 additions and 36 deletions

View File

@@ -1,13 +1,20 @@
<script setup lang="ts">
import { modelControllerSignup } from "@/auth";
import { authClient, modelControllerSignup } from "@/auth";
const page = useTemplateRef<PageInstance>("page");
const { user } = useAuth();
async function openSignin() {
const modal = await modelControllerSignup(page.value?.$el);
await modal.present();
}
async function openSignup() {
const modal = await modelControllerSignup(page.value?.$el);
await modal.present();
}
async function handleLogout() {
await authClient.signOut();
}
</script>
<template>
@@ -24,9 +31,15 @@ async function openSignup() {
</IonToolbar>
</IonHeader>
<IonButton @click="openSignin">
Signin
</IonButton>
<IonButton @click="openSignup">
Signup
</IonButton>
<IonButton @click="handleLogout">
Log out
</IonButton>
{{ user }}
</IonContent>