Skip to content

πŸ”€ :: (#216) - νšŒμ›κ°€μž… api 연결을 ν•˜μ˜€μŠ΅λ‹ˆλ‹€ - #216

Merged
oheunchan07 merged 53 commits into
developfrom
feature/208-sign-up-api-connection
Sep 1, 2025
Merged

oheunchan07 merged 53 commits into
developfrom
feature/208-sign-up-api-connection

Conversation

@oheunchan07

Copy link
Copy Markdown
Member

πŸ’‘ κ°œμš”

νšŒμ›κ°€μž… api 연결을 ν•˜μ˜€μŠ΅λ‹ˆλ‹€

πŸ“ƒ μž‘μ—…λ‚΄μš©

  • 인증 μ½”λ“œ, 인증 이메일 api μΆ”κ°€
  • 학ꡐ μ°ΎκΈ° api μΆ”κ°€
  • νšŒμ› κ°€μž… api μΆ”κ°€

πŸ”€ 변경사항

X

πŸ™‹β€β™‚οΈ μ§ˆλ¬Έμ‚¬ν•­

X

🍴 μ‚¬μš©λ°©λ²•

X

🎸 기타

X

@oheunchan07 oheunchan07 self-assigned this Aug 28, 2025
@oheunchan07 oheunchan07 added the ✨ Feature κΈ°λŠ₯ μΆ”κ°€ label Aug 28, 2025
modifier = modifier
.fillMaxWidth()
.border(width = 1.dp, color = colors.gray100, shape = RoundedCornerShape(size = 8.dp))
.border(width = 1.dp, color = if(selected) colors.main.copy(alpha = 0.5f) else colors.gray100, shape = RoundedCornerShape(size = 8.dp))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ€„λ°”κΏˆ ν•΄μ£Όμ„Έμš”

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μˆ˜μ •ν•˜μ˜€μŠ΅λ‹ˆλ‹€

navigateToSignIn: () -> Unit,
viewModel: SignUpViewModel = hiltViewModel()
) {
val verificationCodeUiState by viewModel.verificationCodeUiState.collectAsStateWithLifecycle()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ§€κΈˆμ€ ViewModel에 UI μƒνƒœκ°€ μ—¬λŸ¬ StateFlow둜 흩어져 μžˆλŠ”λ°, 이λ₯Ό ν•˜λ‚˜μ˜ UiState 데이터 클래슀둜 λ¬Άμ–΄μ„œ 단일 StateFlow둜 κ΄€λ¦¬ν•˜λ©΄ 더 λͺ…ν™•ν•˜κ³  μœ μ§€λ³΄μˆ˜κ°€ μ‰¬μšΈ 것 κ°™μŠ΅λ‹ˆλ‹€

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μˆ˜μ •ν•˜μ˜€μŠ΅λ‹ˆλ‹€

}

if (showCodeInput) {
val timeText = String.format("%02d:%02d", remainingTime / 60, remainingTime % 60)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 λ‘œμ§μ€ ν•¨μˆ˜ν™”ν•΄μ„œ ui:util둜 μ΄λ™ν•˜λŠ”κ²Œ 쒋을것 κ°™μŠ΅λ‹ˆλ‹€

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ—¬κΈ°μ„œλ§Œ μ‚¬μš©ν•˜λŠ” μ‹œκ°„ λ‘œμ§μ΄μ—¬μ„œ ν•¨μˆ˜λ‘œ λΉΌμ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€

setEmailValidated(true)
}
} else {
coroutineScope.launch {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

                                    coroutineScope.launch μ‚¬μš©μ΄ λΆˆν•„μš”ν•΄λ³΄μž…λ‹ˆλ‹€

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μˆ˜μ •ν•˜μ˜€μŠ΅λ‹ˆλ‹€

Comment on lines 397 to 404
val passwordValid = password.length >= 8 &&
listOf(
Regex(".*[a-zA-Z].*").containsMatchIn(passwordTextState),
Regex(".*[0-9].*").containsMatchIn(passwordTextState),
Regex(".*[!@#\$%^&*(),.?\":{}|<>\\[\\]~`\\\\/;'+=-_].*").containsMatchIn(passwordTextState)
Regex(".*[a-zA-Z].*").containsMatchIn(password),
Regex(".*[0-9].*").containsMatchIn(password),
Regex(".*[!@#\$%^&*(),.?\":{}|<>\\[\\]~`\\\\/;'+=-_].*").containsMatchIn(
password
)
).count { it } >= 2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 λ‘œμ§μ€ domain:util으둜 μ΄λ™ν•˜λŠ”κ²Œ μ’‹μ•„λ³΄μž…λ‹ˆλ‹€

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ—¬κΈ°μ„œλ§Œ μ‚¬μš©ν•˜λŠ” λ‘œμ§μ΄μ—¬μ„œ ꡳ이 도메인 μœ ν‹Έλ‘œ μ΄λ™ν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€

}

private fun verificationCode(body: VerificationCodeModel) = viewModelScope.launch {
_verificationCodeUiState.value = VerificationCodeUiState.Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ΄ˆκΈ°κ°’μ€ onStartν•¨μˆ˜λ₯Ό μ‚¬μš©ν•˜λŠ”κ²ƒμ΄ 직관적일것 κ°™μŠ΅λ‹ˆλ‹€

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ν˜Ήμ‹œ μžμ„Ένžˆ 컀멘트 λ‚¨κ²¨μ£Όμ‹€μˆ˜ μžˆμ„κΉŒμ—¬?

@answad answad Sep 1, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private fun verificationEmail(body: VerificationEmailModel) = viewModelScope.launch {
    verificationEmailUseCase(body)
        .onStart {
            _verificationEmailUiState.value = VerificationEmailUiState.Loading
        }
        .catch { e ->
            Logger.e("SignUPViewModel", "인증 메일 보내기 μ‹€νŒ¨: ${e.message}")
            _verificationEmailUiState.value = VerificationEmailUiState.Error(e.message ?: "Unknown error")
        }
        .collect {
            Logger.d("SignUPViewModel", "인증 메일 보내기 성곡")
            _verificationEmailUiState.value = VerificationEmailUiState.Success
        }
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ‚¬μš©ν•˜μ§€ μ•ŠλŠ”κ²ƒλ„ μΆ©λΆ„νžˆ 직관적이닀고 μƒκ°ν•©λ‹ˆλ‹€

Comment on lines +208 to +220
internal fun startResendTimer() {
viewModelScope.launch {
_isResendEnabled.value = false
_remainingTime.value = 60

while (_remainingTime.value > 0) {
delay(1000)
_remainingTime.value = _remainingTime.value - 1
}

_isResendEnabled.value = true
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인증번호 λ°œμ†‘ν›„μ— 앱이 onPause μƒνƒœμΌλ•Œ 타이머가 μž‘λ™ν•˜μ§€ μ•Šμ„ 것 κ°™μŠ΅λ‹ˆλ‹€

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ„΅ 잘 μž‘λ™ν•©λ‹ˆλ‹€

@oheunchan07
oheunchan07 merged commit 0aa0cf7 into develop Sep 1, 2025
1 check passed
@oheunchan07 oheunchan07 changed the title νšŒμ›κ°€μž… api 연결을 ν•˜μ˜€μŠ΅λ‹ˆλ‹€ πŸ”€ :: (#216) - νšŒμ›κ°€μž… api 연결을 ν•˜μ˜€μŠ΅λ‹ˆλ‹€ Sep 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature κΈ°λŠ₯ μΆ”κ°€

Projects

None yet

Development

Successfully merging this pull request may close these issues.

νšŒμ›κ°€μž… apiλ₯Ό μ—°κ²°ν•΄μ•Ό ν•©λ‹ˆλ‹€

2 participants