From d75ec449ec2ced792e04e55bc3f35a3100f49135 Mon Sep 17 00:00:00 2001 From: Tmdhoon2 Date: Mon, 5 Feb 2024 14:55:03 +0900 Subject: [PATCH 1/6] =?UTF-8?q?feat=20::=20SelectGenderScreen=20=ED=8D=BC?= =?UTF-8?q?=EB=B8=94=EB=A6=AC=EC=8B=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../retum/signup/ui/SelectGenderScreen.kt | 150 ++++++++++++++++++ .../signup/src/main/res/drawable/ic_man.xml | 13 ++ .../signup/src/main/res/drawable/ic_woman.xml | 13 ++ .../signup/src/main/res/values/strings.xml | 4 + 4 files changed, 180 insertions(+) create mode 100644 feature/signup/src/main/java/team/retum/signup/ui/SelectGenderScreen.kt create mode 100644 feature/signup/src/main/res/drawable/ic_man.xml create mode 100644 feature/signup/src/main/res/drawable/ic_woman.xml diff --git a/feature/signup/src/main/java/team/retum/signup/ui/SelectGenderScreen.kt b/feature/signup/src/main/java/team/retum/signup/ui/SelectGenderScreen.kt new file mode 100644 index 000000000..febd63224 --- /dev/null +++ b/feature/signup/src/main/java/team/retum/signup/ui/SelectGenderScreen.kt @@ -0,0 +1,150 @@ +package team.retum.signup.ui + +import androidx.compose.animation.animateColorAsState +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.ripple.rememberRipple +import androidx.compose.material3.Icon +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp +import team.retum.common.enums.Gender +import team.retum.signup.R +import team.returm.jobisdesignsystemv2.appbar.JobisLargeTopAppBar +import team.returm.jobisdesignsystemv2.button.ButtonColor +import team.returm.jobisdesignsystemv2.button.JobisButton +import team.returm.jobisdesignsystemv2.foundation.JobisTheme +import team.returm.jobisdesignsystemv2.foundation.JobisTypography + +@Composable +fun SelectGender(onBackPressed: () -> Unit) { + SelectGenderScreen(onBackPressed = onBackPressed) +} + +@Composable +private fun SelectGenderScreen( + onBackPressed: () -> Unit, +) { + var gender: Gender? by remember { mutableStateOf(null) } + + Column( + modifier = Modifier + .fillMaxSize() + .background(JobisTheme.colors.background) + .padding(horizontal = 24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + JobisLargeTopAppBar( + title = stringResource(id = R.string.select_gender), + onBackPressed = onBackPressed, + ) + Genders( + modifier = Modifier + .fillMaxWidth() + .padding(vertical = 16.dp), + gender = gender, + onClick = { gender = it }, + ) + Spacer(modifier = Modifier.weight(1f)) + JobisButton( + modifier = Modifier.padding(bottom = 24.dp), + text = stringResource(id = R.string.next), + onClick = {}, + color = ButtonColor.Primary, + ) + } +} + +@Composable +private fun Genders( + modifier: Modifier = Modifier, + gender: Gender?, + onClick: (Gender) -> Unit, +) { + Row( + modifier = modifier, + horizontalArrangement = Arrangement.spacedBy(12.dp), + ) { + GenderCard( + selected = gender == Gender.MAN, + icon = R.drawable.ic_man, + text = stringResource(id = R.string.gender_man), + onClick = { onClick(Gender.MAN) }, + ) + GenderCard( + selected = gender == Gender.WOMAN, + icon = R.drawable.ic_woman, + text = stringResource(id = R.string.gender_woman), + onClick = { onClick(Gender.WOMAN) }, + ) + } +} + +@Composable +private fun RowScope.GenderCard( + selected: Boolean, + icon: Int, + text: String, + onClick: () -> Unit, +) { + val backgroundColor by animateColorAsState( + targetValue = if (selected) JobisTheme.colors.onPrimary + else JobisTheme.colors.inverseSurface, + label = "", + ) + val textColor by animateColorAsState( + targetValue = if (selected) JobisTheme.colors.background + else JobisTheme.colors.onBackground, + label = "", + ) + val tint by animateColorAsState( + targetValue = if (selected) JobisTheme.colors.background + else JobisTheme.colors.onSurfaceVariant, + label = "", + ) + + Column( + modifier = Modifier + .weight(1f) + .clip(RoundedCornerShape(12.dp)) + .clickable( + onClick = onClick, + indication = rememberRipple(), + interactionSource = remember { MutableInteractionSource() }, + ) + .background(backgroundColor) + .padding(vertical = 24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(4.dp), + ) { + Icon( + painter = painterResource(id = icon), + contentDescription = "gender", + tint = tint, + ) + Text( + text = text, + color = textColor, + style = JobisTypography.HeadLine, + ) + } +} diff --git a/feature/signup/src/main/res/drawable/ic_man.xml b/feature/signup/src/main/res/drawable/ic_man.xml new file mode 100644 index 000000000..363506439 --- /dev/null +++ b/feature/signup/src/main/res/drawable/ic_man.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/feature/signup/src/main/res/drawable/ic_woman.xml b/feature/signup/src/main/res/drawable/ic_woman.xml new file mode 100644 index 000000000..fbb7bb030 --- /dev/null +++ b/feature/signup/src/main/res/drawable/ic_woman.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/feature/signup/src/main/res/values/strings.xml b/feature/signup/src/main/res/values/strings.xml index 0c7c14cbf..0c85d8fab 100644 --- a/feature/signup/src/main/res/values/strings.xml +++ b/feature/signup/src/main/res/values/strings.xml @@ -17,4 +17,8 @@ 계정의 비밀번호를 설정해주세요. 비밀번호 확인 위 비밀번호를 한 번 더 입력해주세요. + + 성별을 선택해주세요 + 남성 + 여성 \ No newline at end of file From 48b58e84759fea06a8fd8364d4e2c6b666149650 Mon Sep 17 00:00:00 2001 From: Tmdhoon2 Date: Mon, 5 Feb 2024 14:55:26 +0900 Subject: [PATCH 2/6] =?UTF-8?q?feat=20::=20Gender=20enum=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/common/src/main/java/team/retum/common/enums/Gender.kt | 6 ++++++ feature/signup/build.gradle.kts | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 core/common/src/main/java/team/retum/common/enums/Gender.kt diff --git a/core/common/src/main/java/team/retum/common/enums/Gender.kt b/core/common/src/main/java/team/retum/common/enums/Gender.kt new file mode 100644 index 000000000..6663e0477 --- /dev/null +++ b/core/common/src/main/java/team/retum/common/enums/Gender.kt @@ -0,0 +1,6 @@ +package team.retum.common.enums + +enum class Gender { + MAN, + WOMAN, +} diff --git a/feature/signup/build.gradle.kts b/feature/signup/build.gradle.kts index ca5a7ea31..60d50ad47 100644 --- a/feature/signup/build.gradle.kts +++ b/feature/signup/build.gradle.kts @@ -11,3 +11,7 @@ apply() android { namespace = "team.retum.signup" } + +dependencies { + implementation(project(":core:common")) +} From 38635efbd2a712e3d9371545a472e3563113e6fd Mon Sep 17 00:00:00 2001 From: Tmdhoon2 Date: Mon, 5 Feb 2024 15:27:27 +0900 Subject: [PATCH 3/6] =?UTF-8?q?feat=20::=20SelectGender=20=EB=82=B4?= =?UTF-8?q?=EB=B9=84=EA=B2=8C=EC=9D=B4=EC=85=98=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../navigation/AuthNavigation.kt | 2 ++ .../navigation/SelectGenderNavigation.kt | 18 ++++++++++++++++++ .../navigation/SettingPasswordNavigation.kt | 2 ++ .../signup/navigation/SignUpNavigation.kt | 5 +++++ .../retum/signup/ui/SettingPasswordScreen.kt | 3 ++- 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 feature/signup/src/main/java/team/retum/signup/navigation/SelectGenderNavigation.kt diff --git a/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt b/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt index 9d7db7e04..7f2e6fc5d 100644 --- a/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt +++ b/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt @@ -9,6 +9,7 @@ import team.retum.landing.navigation.landing import team.retum.signin.navigation.navigateToSignIn import team.retum.signin.navigation.signIn import team.retum.signup.navigation.navigateToInputEmail +import team.retum.signup.navigation.navigateToSelectGender import team.retum.signup.navigation.navigateToSettingPassword import team.retum.signup.navigation.navigateToSignUp import team.retum.signup.navigation.signUp @@ -32,6 +33,7 @@ internal fun NavGraphBuilder.authNavigation(navController: NavController) { onBackClick = navController::popBackStack, onInputEmailClick = navController::navigateToInputEmail, onInputPasswordClick = navController::navigateToSettingPassword, + onSelectGenderClick = navController::navigateToSelectGender, ) } } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/SelectGenderNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/SelectGenderNavigation.kt new file mode 100644 index 000000000..e1d0c2822 --- /dev/null +++ b/feature/signup/src/main/java/team/retum/signup/navigation/SelectGenderNavigation.kt @@ -0,0 +1,18 @@ +package team.retum.signup.navigation + +import androidx.navigation.NavController +import androidx.navigation.NavGraphBuilder +import androidx.navigation.compose.composable +import team.retum.signup.ui.SelectGender + +const val NAVIGATION_SELECT_GENDER = "selectGender" + +fun NavGraphBuilder.selectGender(onBackPressed: () -> Unit) { + composable(NAVIGATION_SELECT_GENDER) { + SelectGender(onBackPressed = onBackPressed) + } +} + +fun NavController.navigateToSelectGender() { + navigate(NAVIGATION_SELECT_GENDER) +} diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt index 3289b6078..38d2dc1e3 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt @@ -9,10 +9,12 @@ const val NAVIGATION_SIGN_UP_SETTING_PASSWORD = "signUp/settingPassword" fun NavGraphBuilder.settingPassword( onBackClick: () -> Unit, + onNextClick: () -> Unit, ) { composable(route = NAVIGATION_SIGN_UP_SETTING_PASSWORD) { SettingPasswordScreen( onBackClick = onBackClick, + onNextClick = onNextClick, ) } } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt index 8a220d9b3..3b5b490fa 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt @@ -10,6 +10,7 @@ fun NavGraphBuilder.signUp( onBackClick: () -> Unit, onInputEmailClick: () -> Unit, onInputPasswordClick: () -> Unit, + onSelectGenderClick: () -> Unit, ) { navigation( route = NAVIGATION_SIGN_UP, @@ -25,6 +26,10 @@ fun NavGraphBuilder.signUp( ) settingPassword( onBackClick = onBackClick, + onNextClick = onSelectGenderClick, + ) + selectGender( + onBackPressed = onBackClick, ) } } diff --git a/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt b/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt index 58d26eb82..82edfcadf 100644 --- a/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt +++ b/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt @@ -25,6 +25,7 @@ import team.returm.jobisdesignsystemv2.textfield.JobisTextField @Composable fun SettingPasswordScreen( onBackClick: () -> Unit, + onNextClick: () -> Unit, ) { // TODO: viewModel로 옮기기 var password by remember { mutableStateOf("") } @@ -51,7 +52,7 @@ fun SettingPasswordScreen( modifier = Modifier.padding(vertical = 12.dp), text = stringResource(id = R.string.next), color = ButtonColor.Primary, - onClick = { }, + onClick = onNextClick, ) } } From a69d92f149440977f81caaf155e09781ee213105 Mon Sep 17 00:00:00 2001 From: Tmdhoon2 Date: Mon, 5 Feb 2024 15:39:58 +0900 Subject: [PATCH 4/6] =?UTF-8?q?refactor=20::=20navigate=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jobisandroidv2/navigation/AuthNavigation.kt | 4 ++-- .../retum/signin/navigation/SignInNavigation.kt | 4 ++-- .../signup/navigation/InputEmailNavigation.kt | 6 +++--- .../navigation/InputPersonalInfoNavigation.kt | 6 +++--- .../signup/navigation/SelectGenderNavigation.kt | 10 ++++++++-- .../signup/navigation/SettingPasswordNavigation.kt | 6 +++--- .../retum/signup/navigation/SignUpNavigation.kt | 12 +++++++----- .../java/team/retum/signup/ui/InputEmailScreen.kt | 4 ++-- .../retum/signup/ui/InputPersonalInfoScreen.kt | 4 ++-- .../team/retum/signup/ui/SelectGenderScreen.kt | 14 +++++++++++--- .../team/retum/signup/ui/SettingPasswordScreen.kt | 4 ++-- 11 files changed, 45 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt b/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt index 7f2e6fc5d..e17285bfc 100644 --- a/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt +++ b/app/src/main/java/team/retum/jobisandroidv2/navigation/AuthNavigation.kt @@ -26,11 +26,11 @@ internal fun NavGraphBuilder.authNavigation(navController: NavController) { onSignUpClick = navController::navigateToSignUp, ) signIn( - onBackClick = navController::popBackStack, + onBackPressed = navController::popBackStack, onSignInSuccess = navController::navigateToRoot, ) signUp( - onBackClick = navController::popBackStack, + onBackPressed = navController::popBackStack, onInputEmailClick = navController::navigateToInputEmail, onInputPasswordClick = navController::navigateToSettingPassword, onSelectGenderClick = navController::navigateToSelectGender, diff --git a/feature/signin/src/main/java/team/retum/signin/navigation/SignInNavigation.kt b/feature/signin/src/main/java/team/retum/signin/navigation/SignInNavigation.kt index b7f4b7fc9..61408c5ae 100644 --- a/feature/signin/src/main/java/team/retum/signin/navigation/SignInNavigation.kt +++ b/feature/signin/src/main/java/team/retum/signin/navigation/SignInNavigation.kt @@ -8,12 +8,12 @@ import team.retum.signin.ui.SignIn const val NAVIGATION_SIGN_IN = "signIn" fun NavGraphBuilder.signIn( - onBackClick: () -> Unit, + onBackPressed: () -> Unit, onSignInSuccess: () -> Unit, ) { composable(route = NAVIGATION_SIGN_IN) { SignIn( - onBackClick = onBackClick, + onBackClick = onBackPressed, onSignInSuccess = onSignInSuccess, ) } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/InputEmailNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/InputEmailNavigation.kt index 4218da7cd..d87d308e0 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/InputEmailNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/InputEmailNavigation.kt @@ -8,13 +8,13 @@ import team.retum.signup.ui.InputEmailScreen const val NAVIGATION_SIGN_UP_INPUT_EMAIL = "signUp/inputEmail" fun NavGraphBuilder.inputEmail( - onBackClick: () -> Unit, + onBackPressed: () -> Unit, onNextClick: () -> Unit, ) { - composable(route = NAVIGATION_SIGN_UP_INPUT_EMAIL) { + composable(NAVIGATION_SIGN_UP_INPUT_EMAIL) { InputEmailScreen( + onBackPressed = onBackPressed, onNextClick = onNextClick, - onBackClick = onBackClick, ) } } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/InputPersonalInfoNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/InputPersonalInfoNavigation.kt index 7f4de2b04..b2b6e5f87 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/InputPersonalInfoNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/InputPersonalInfoNavigation.kt @@ -8,12 +8,12 @@ import team.retum.signup.ui.InputPersonalInfoScreen const val NAVIGATION_SIGN_UP_INPUT_PERSONAL_INFO = "signUp/inputPersonalInfo" fun NavGraphBuilder.inputPersonalInformation( - onBackClick: () -> Unit, + onBackPressed: () -> Unit, onNextClick: () -> Unit, ) { - composable(route = NAVIGATION_SIGN_UP_INPUT_PERSONAL_INFO) { + composable(NAVIGATION_SIGN_UP_INPUT_PERSONAL_INFO) { InputPersonalInfoScreen( - onBackClick = onBackClick, + onBackPressed = onBackPressed, onNextClick = onNextClick, ) } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/SelectGenderNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/SelectGenderNavigation.kt index e1d0c2822..078963e42 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/SelectGenderNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/SelectGenderNavigation.kt @@ -7,9 +7,15 @@ import team.retum.signup.ui.SelectGender const val NAVIGATION_SELECT_GENDER = "selectGender" -fun NavGraphBuilder.selectGender(onBackPressed: () -> Unit) { +fun NavGraphBuilder.selectGender( + onBackPressed: () -> Unit, + onNextClick: () -> Unit, +) { composable(NAVIGATION_SELECT_GENDER) { - SelectGender(onBackPressed = onBackPressed) + SelectGender( + onBackPressed = onBackPressed, + onNextClick = onNextClick, + ) } } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt index 38d2dc1e3..6293ddbaa 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt @@ -8,12 +8,12 @@ import team.retum.signup.ui.SettingPasswordScreen const val NAVIGATION_SIGN_UP_SETTING_PASSWORD = "signUp/settingPassword" fun NavGraphBuilder.settingPassword( - onBackClick: () -> Unit, + onBackPressed: () -> Unit, onNextClick: () -> Unit, ) { - composable(route = NAVIGATION_SIGN_UP_SETTING_PASSWORD) { + composable(NAVIGATION_SIGN_UP_SETTING_PASSWORD) { SettingPasswordScreen( - onBackClick = onBackClick, + onBackPressed = onBackPressed, onNextClick = onNextClick, ) } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt index 3b5b490fa..a7e48b6a4 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt @@ -7,7 +7,7 @@ import androidx.navigation.navigation const val NAVIGATION_SIGN_UP = "signUp" fun NavGraphBuilder.signUp( - onBackClick: () -> Unit, + onBackPressed: () -> Unit, onInputEmailClick: () -> Unit, onInputPasswordClick: () -> Unit, onSelectGenderClick: () -> Unit, @@ -17,19 +17,21 @@ fun NavGraphBuilder.signUp( startDestination = NAVIGATION_SIGN_UP_INPUT_PERSONAL_INFO, ) { inputPersonalInformation( - onBackClick = onBackClick, + onBackPressed = onBackPressed, onNextClick = onInputEmailClick, ) inputEmail( + onBackPressed = onBackPressed, onNextClick = onInputPasswordClick, - onBackClick = onBackClick, ) settingPassword( - onBackClick = onBackClick, + onBackPressed = onBackPressed, onNextClick = onSelectGenderClick, ) + // TODO 다음 스크린 작업 시 onNextClick 추가 selectGender( - onBackPressed = onBackClick, + onBackPressed = onBackPressed, + onNextClick = {}, ) } } diff --git a/feature/signup/src/main/java/team/retum/signup/ui/InputEmailScreen.kt b/feature/signup/src/main/java/team/retum/signup/ui/InputEmailScreen.kt index 8bd2d1d6e..e16eed03b 100644 --- a/feature/signup/src/main/java/team/retum/signup/ui/InputEmailScreen.kt +++ b/feature/signup/src/main/java/team/retum/signup/ui/InputEmailScreen.kt @@ -26,7 +26,7 @@ import team.returm.jobisdesignsystemv2.textfield.JobisTextField @Composable internal fun InputEmailScreen( - onBackClick: () -> Unit, + onBackPressed: () -> Unit, onNextClick: () -> Unit, ) { // TODO: viewModel로 옮기기 @@ -41,7 +41,7 @@ internal fun InputEmailScreen( ) { JobisLargeTopAppBar( title = stringResource(id = R.string.input_email), - onBackPressed = onBackClick, + onBackPressed = onBackPressed, ) EmailInputs( email = { email }, diff --git a/feature/signup/src/main/java/team/retum/signup/ui/InputPersonalInfoScreen.kt b/feature/signup/src/main/java/team/retum/signup/ui/InputPersonalInfoScreen.kt index 963f56b88..6aee90189 100644 --- a/feature/signup/src/main/java/team/retum/signup/ui/InputPersonalInfoScreen.kt +++ b/feature/signup/src/main/java/team/retum/signup/ui/InputPersonalInfoScreen.kt @@ -23,7 +23,7 @@ import team.returm.jobisdesignsystemv2.textfield.JobisTextField @Composable fun InputPersonalInfoScreen( - onBackClick: () -> Unit, + onBackPressed: () -> Unit, onNextClick: () -> Unit, ) { var name by remember { mutableStateOf("") } @@ -37,7 +37,7 @@ fun InputPersonalInfoScreen( ) { JobisLargeTopAppBar( title = stringResource(id = R.string.input_personal_information), - onBackPressed = onBackClick, + onBackPressed = onBackPressed, ) PersonalInformationInputs( name = { name }, diff --git a/feature/signup/src/main/java/team/retum/signup/ui/SelectGenderScreen.kt b/feature/signup/src/main/java/team/retum/signup/ui/SelectGenderScreen.kt index febd63224..ff677b8be 100644 --- a/feature/signup/src/main/java/team/retum/signup/ui/SelectGenderScreen.kt +++ b/feature/signup/src/main/java/team/retum/signup/ui/SelectGenderScreen.kt @@ -36,14 +36,22 @@ import team.returm.jobisdesignsystemv2.foundation.JobisTheme import team.returm.jobisdesignsystemv2.foundation.JobisTypography @Composable -fun SelectGender(onBackPressed: () -> Unit) { - SelectGenderScreen(onBackPressed = onBackPressed) +fun SelectGender( + onBackPressed: () -> Unit, + onNextClick: () -> Unit, +) { + SelectGenderScreen( + onBackPressed = onBackPressed, + onNextClick = onNextClick, + ) } @Composable private fun SelectGenderScreen( onBackPressed: () -> Unit, + onNextClick: () -> Unit, ) { + // TODO 뷰모델로 옮기기 var gender: Gender? by remember { mutableStateOf(null) } Column( @@ -68,7 +76,7 @@ private fun SelectGenderScreen( JobisButton( modifier = Modifier.padding(bottom = 24.dp), text = stringResource(id = R.string.next), - onClick = {}, + onClick = onNextClick, color = ButtonColor.Primary, ) } diff --git a/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt b/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt index 82edfcadf..500af2316 100644 --- a/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt +++ b/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt @@ -24,7 +24,7 @@ import team.returm.jobisdesignsystemv2.textfield.JobisTextField @Composable fun SettingPasswordScreen( - onBackClick: () -> Unit, + onBackPressed: () -> Unit, onNextClick: () -> Unit, ) { // TODO: viewModel로 옮기기 @@ -39,7 +39,7 @@ fun SettingPasswordScreen( ) { JobisLargeTopAppBar( title = stringResource(id = R.string.setting_password), - onBackPressed = onBackClick, + onBackPressed = onBackPressed, ) PasswordInputs( password = { password }, From 40ca21c5cd367edda02e2f6e5c7d796ddcb0b7e6 Mon Sep 17 00:00:00 2001 From: Tmdhoon2 Date: Mon, 5 Feb 2024 16:00:29 +0900 Subject: [PATCH 5/6] =?UTF-8?q?refactor=20::=20navigation=20route=20?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team/retum/signup/navigation/InputEmailNavigation.kt | 6 +++--- .../retum/signup/navigation/InputPersonalInfoNavigation.kt | 6 +++--- .../retum/signup/navigation/SettingPasswordNavigation.kt | 6 +++--- .../java/team/retum/signup/navigation/SignUpNavigation.kt | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/InputEmailNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/InputEmailNavigation.kt index d87d308e0..bb167a8b4 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/InputEmailNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/InputEmailNavigation.kt @@ -5,13 +5,13 @@ import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import team.retum.signup.ui.InputEmailScreen -const val NAVIGATION_SIGN_UP_INPUT_EMAIL = "signUp/inputEmail" +const val NAVIGATION_INPUT_EMAIL = "inputEmail" fun NavGraphBuilder.inputEmail( onBackPressed: () -> Unit, onNextClick: () -> Unit, ) { - composable(NAVIGATION_SIGN_UP_INPUT_EMAIL) { + composable(NAVIGATION_INPUT_EMAIL) { InputEmailScreen( onBackPressed = onBackPressed, onNextClick = onNextClick, @@ -20,5 +20,5 @@ fun NavGraphBuilder.inputEmail( } fun NavController.navigateToInputEmail() { - navigate(NAVIGATION_SIGN_UP_INPUT_EMAIL) + navigate(NAVIGATION_INPUT_EMAIL) } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/InputPersonalInfoNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/InputPersonalInfoNavigation.kt index b2b6e5f87..5eb96da86 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/InputPersonalInfoNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/InputPersonalInfoNavigation.kt @@ -5,13 +5,13 @@ import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import team.retum.signup.ui.InputPersonalInfoScreen -const val NAVIGATION_SIGN_UP_INPUT_PERSONAL_INFO = "signUp/inputPersonalInfo" +const val NAVIGATION_INPUT_PERSONAL_INFO = "inputPersonalInfo" fun NavGraphBuilder.inputPersonalInformation( onBackPressed: () -> Unit, onNextClick: () -> Unit, ) { - composable(NAVIGATION_SIGN_UP_INPUT_PERSONAL_INFO) { + composable(NAVIGATION_INPUT_PERSONAL_INFO) { InputPersonalInfoScreen( onBackPressed = onBackPressed, onNextClick = onNextClick, @@ -20,5 +20,5 @@ fun NavGraphBuilder.inputPersonalInformation( } fun NavController.navigateToInputPersonalInfo() { - navigate(NAVIGATION_SIGN_UP_INPUT_PERSONAL_INFO) + navigate(NAVIGATION_INPUT_PERSONAL_INFO) } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt index 6293ddbaa..0e3907773 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/SettingPasswordNavigation.kt @@ -5,13 +5,13 @@ import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import team.retum.signup.ui.SettingPasswordScreen -const val NAVIGATION_SIGN_UP_SETTING_PASSWORD = "signUp/settingPassword" +const val NAVIGATION_SETTING_PASSWORD = "settingPassword" fun NavGraphBuilder.settingPassword( onBackPressed: () -> Unit, onNextClick: () -> Unit, ) { - composable(NAVIGATION_SIGN_UP_SETTING_PASSWORD) { + composable(NAVIGATION_SETTING_PASSWORD) { SettingPasswordScreen( onBackPressed = onBackPressed, onNextClick = onNextClick, @@ -20,5 +20,5 @@ fun NavGraphBuilder.settingPassword( } fun NavController.navigateToSettingPassword() { - navigate(NAVIGATION_SIGN_UP_SETTING_PASSWORD) + navigate(NAVIGATION_SETTING_PASSWORD) } diff --git a/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt b/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt index a7e48b6a4..d0598dd4b 100644 --- a/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt +++ b/feature/signup/src/main/java/team/retum/signup/navigation/SignUpNavigation.kt @@ -14,7 +14,7 @@ fun NavGraphBuilder.signUp( ) { navigation( route = NAVIGATION_SIGN_UP, - startDestination = NAVIGATION_SIGN_UP_INPUT_PERSONAL_INFO, + startDestination = NAVIGATION_INPUT_PERSONAL_INFO, ) { inputPersonalInformation( onBackPressed = onBackPressed, From 3762199f76afc9c7520490354f7d48e4b839736f Mon Sep 17 00:00:00 2001 From: Tmdhoon2 Date: Mon, 5 Feb 2024 16:01:34 +0900 Subject: [PATCH 6/6] =?UTF-8?q?refactor=20::=20setting=20password=20screen?= =?UTF-8?q?=20=EB=B2=84=ED=8A=BC=20=ED=8C=A8=EB=94=A9=20=EC=A1=B0=EC=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt b/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt index 500af2316..40fba53ee 100644 --- a/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt +++ b/feature/signup/src/main/java/team/retum/signup/ui/SettingPasswordScreen.kt @@ -49,7 +49,7 @@ fun SettingPasswordScreen( ) Spacer(modifier = Modifier.weight(1f)) JobisButton( - modifier = Modifier.padding(vertical = 12.dp), + modifier = Modifier.padding(bottom = 24.dp), text = stringResource(id = R.string.next), color = ButtonColor.Primary, onClick = onNextClick,