feat: 更新邮箱验证逻辑,添加用户姓名字段,优化组件交互
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user