v0.1.48 - 인증 메일 재전송과 TODO 정리
This commit is contained in:
46
src/App.vue
46
src/App.vue
@@ -25,6 +25,7 @@ import {
|
||||
persistAuthState,
|
||||
readAuthState,
|
||||
requestPasswordReset,
|
||||
requestVerification,
|
||||
signup,
|
||||
updatePassword,
|
||||
updateProfile,
|
||||
@@ -1635,6 +1636,28 @@ async function submitAuthForm() {
|
||||
}
|
||||
}
|
||||
|
||||
async function resendVerificationEmail() {
|
||||
const email = authForm.email.trim()
|
||||
|
||||
if (!email || !email.includes('@')) {
|
||||
authMessage.value = '인증 메일을 다시 받으려면 이메일 주소를 먼저 입력해 주세요.'
|
||||
return
|
||||
}
|
||||
|
||||
authBusy.value = true
|
||||
|
||||
try {
|
||||
const result = await requestVerification({ email }, authToken.value || undefined)
|
||||
authMessage.value = result.verificationPreviewUrl
|
||||
? `${result.message} 개발용 링크: ${result.verificationPreviewUrl}`
|
||||
: result.message
|
||||
} catch (error) {
|
||||
authMessage.value = toUserFacingApiError(error, '인증 메일을 다시 보내지 못했습니다.')
|
||||
} finally {
|
||||
authBusy.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function restoreAuthSession() {
|
||||
const savedAuth = readAuthState()
|
||||
|
||||
@@ -3248,17 +3271,18 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AuthDialog
|
||||
:open="authDialogOpen"
|
||||
:mode="authMode"
|
||||
:form="authForm"
|
||||
:busy="authBusy"
|
||||
:message="authMessage"
|
||||
@close="closeAuthDialog"
|
||||
@submit="submitAuthForm"
|
||||
@switch-mode="authMode = $event; authMessage = ''"
|
||||
@update:field="updateAuthField"
|
||||
/>
|
||||
<AuthDialog
|
||||
:open="authDialogOpen"
|
||||
:mode="authMode"
|
||||
:form="authForm"
|
||||
:busy="authBusy"
|
||||
:message="authMessage"
|
||||
@close="closeAuthDialog"
|
||||
@submit="submitAuthForm"
|
||||
@resend-verification="resendVerificationEmail"
|
||||
@switch-mode="authMode = $event; authMessage = ''"
|
||||
@update:field="updateAuthField"
|
||||
/>
|
||||
|
||||
<div
|
||||
v-if="printDialogOpen"
|
||||
|
||||
Reference in New Issue
Block a user