🐛 Bug fixes and optimization

This commit is contained in:
2024-08-13 18:26:36 +08:00
parent 223f97038c
commit baf529e838
8 changed files with 63 additions and 21 deletions

View File

@ -59,6 +59,21 @@ async function pickUpTicket() {
onMounted(() => pickUpTicket())
const id = useUserinfo()
const router = useRouter()
watch(id, (value) => {
if (value.isLoggedIn) {
if (route.query["close"]) {
window.close()
} else if (route.query["redirect_uri"]) {
window.open((route.query["redirect_uri"] as string) ?? "/", "_self")
} else {
router.push("/users/me")
}
}
}, { deep: true, immediate: true })
const panel = ref("authenticate")
const panels: { [id: string]: Component } = {