refactor: redirect to user center by default after registration

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/4900/head
Ryan Wang 2023-11-23 17:04:06 +08:00
parent 457e05913e
commit ec7dbf0a9b
1 changed files with 5 additions and 1 deletions

View File

@ -21,6 +21,10 @@ function onLoginSucceed() {
window.location.reload(); window.location.reload();
} }
function onSignupSucceed() {
window.location.href = "/uc";
}
const type = useRouteQuery<string>("type", ""); const type = useRouteQuery<string>("type", "");
function handleChangeType() { function handleChangeType() {
@ -45,7 +49,7 @@ watch(
<div class="flex h-screen flex-col items-center bg-white/90 pt-[30vh]"> <div class="flex h-screen flex-col items-center bg-white/90 pt-[30vh]">
<IconLogo class="mb-8" /> <IconLogo class="mb-8" />
<div class="flex w-72 flex-col"> <div class="flex w-72 flex-col">
<SignupForm v-if="type === 'signup'" @succeed="onLoginSucceed" /> <SignupForm v-if="type === 'signup'" @succeed="onSignupSucceed" />
<LoginForm v-else @succeed="onLoginSucceed" /> <LoginForm v-else @succeed="onLoginSucceed" />
<SocialAuthProviders /> <SocialAuthProviders />
<div <div