Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ”— :: (#24) ๋น„๋ฐ€๋ฒˆํ˜ธ ์„ค์ • ์Šคํฌ๋ฆฐ ํผ๋ธ”๋ฆฌ์‹ฑ #27

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import team.retum.signup.navigation.navigateToInputPersonalInfo
import team.retum.signup.navigation.navigateToSignUp
import team.retum.signup.navigation.signUp


Tmdhoon2 marked this conversation as resolved.
Show resolved Hide resolved
const val NAVIGATION_AUTH = "auth"

internal fun NavGraphBuilder.authNavigation(navController: NavController) {
Expand All @@ -25,6 +26,7 @@ internal fun NavGraphBuilder.authNavigation(navController: NavController) {
)
signIn(onBackClick = navController::popBackStack)
signUp(
navController = navController,
Tmdhoon2 marked this conversation as resolved.
Show resolved Hide resolved
onBackClick = navController::popBackStack,
onNextClick = navController::navigateToInputEmail,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import team.retum.signup.ui.InputEmailScreen
const val NAVIGATION_SIGN_UP_INPUT_EMAIL = "signUp/inputEmail"

fun NavGraphBuilder.inputEmail(
navController: NavController,
onBackClick: () -> Unit,
) {
composable(route = NAVIGATION_SIGN_UP_INPUT_EMAIL) {
InputEmailScreen(onBackClick = onBackClick)
InputEmailScreen(navController = navController, onBackClick = onBackClick)
Tmdhoon2 marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package team.retum.signup.navigation

import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.compose.composable
import team.retum.signup.ui.SettingPasswordScreen

const val NAVIGATION_SIGN_UP_SETTING_PASSWORD = "signUp/settingPassword"

fun NavGraphBuilder.settingPassword(
onBackClick: () -> Unit,
){
Copy link
Collaborator

Choose a reason for hiding this comment

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

์—ฌ๊ธฐ ๋„์–ด์“ฐ๊ธฐ

composable(route = NAVIGATION_SIGN_UP_SETTING_PASSWORD) {
SettingPasswordScreen(
onBackClick = onBackClick,
)
}
}

fun NavController.navigateToSettingPassword(){
navigate(NAVIGATION_SIGN_UP_SETTING_PASSWORD)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.navigation.navigation
const val NAVIGATION_SIGN_UP = "signUp"

fun NavGraphBuilder.signUp(
navController: NavController,
onBackClick: () -> Unit,
onNextClick: () -> Unit,
) {
Expand All @@ -18,7 +19,8 @@ fun NavGraphBuilder.signUp(
onBackClick = onBackClick,
onNextClick = onNextClick,
)
inputEmail(onBackClick = onBackClick)
inputEmail( navController = navController, onBackClick = onBackClick)
settingPassword(onBackClick = onBackClick)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import team.retum.signup.R
import team.retum.signup.navigation.NAVIGATION_SIGN_UP_SETTING_PASSWORD
import team.returm.jobisdesignsystemv2.appbar.JobisLargeTopAppBar
import team.returm.jobisdesignsystemv2.button.ButtonColor
import team.returm.jobisdesignsystemv2.button.JobisButton
Expand All @@ -26,6 +28,7 @@ import team.returm.jobisdesignsystemv2.textfield.JobisTextField

@Composable
internal fun InputEmailScreen(
navController: NavController,
onBackClick: () -> Unit,
) {
// TODO: viewModel๋กœ ์˜ฎ๊ธฐ๊ธฐ
Expand Down Expand Up @@ -53,7 +56,9 @@ internal fun InputEmailScreen(
modifier = Modifier.padding(bottom = 24.dp),
text = stringResource(id = R.string.next),
color = ButtonColor.Primary,
onClick = {},
onClick = {
navController.navigate(route = NAVIGATION_SIGN_UP_SETTING_PASSWORD)
Tmdhoon2 marked this conversation as resolved.
Show resolved Hide resolved
},
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
package team.retum.signup.ui

import androidx.compose.foundation.Image
Copy link
Collaborator

Choose a reason for hiding this comment

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

์•ˆ์“ฐ๋Š” import ์ง€์šฐ๊ธฐ

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Icon
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.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
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.JobisIcon
import team.returm.jobisdesignsystemv2.foundation.JobisTheme
import team.returm.jobisdesignsystemv2.textfield.DescriptionType
import team.returm.jobisdesignsystemv2.textfield.JobisTextField

@Composable
fun SettingPasswordScreen(
onBackClick: () -> Unit,
) {
var password by remember { mutableStateOf("") }
var checkPassword by remember { mutableStateOf("") }
Tmdhoon2 marked this conversation as resolved.
Show resolved Hide resolved
Column(
modifier = Modifier
.fillMaxSize()
.background(JobisTheme.colors.background)
.padding(horizontal = 24.dp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
JobisLargeTopAppBar(
title = stringResource(id = R.string.setting_password),
onBackPressed = onBackClick,
)
PasswordInputs(
password = { password },
checkPassword = { checkPassword },
onPasswordChange = { password = it },
onCheckPassword = { password = it },
Copy link
Collaborator

Choose a reason for hiding this comment

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

์—ฌ๊ธฐ ์ž˜๋ชป๋˜์–ด์žˆ๋Š”๋ฐ viewModel ์ถ”๊ฐ€ํ•˜๋ฉด ๋ฐ”๊ฟ”์ค˜

)
Spacer(modifier = Modifier.weight(1f))
JobisButton(
modifier = Modifier.padding(bottom = 24.dp),
Copy link
Collaborator

Choose a reason for hiding this comment

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

์ด๊ฑฐ ๋””์ž์ธ์ด๋ž‘ ์•ˆ๋งž์•„
bottom = 24.dp๊ฐ€ ์•„๋‹ˆ๋ผ vertical = 12.dp์•ผ

text = stringResource(id = R.string.next),
color = ButtonColor.Primary,
onClick = { },
)
}
}

@Composable
fun PasswordInputs(
password: () -> String,
checkPassword: () -> String,
onPasswordChange: (String) -> Unit,
onCheckPassword: (String) -> Unit,
) {
JobisTextField(
title = stringResource(id = R.string.password),
value = password,
onValueChange = onPasswordChange,
hint = stringResource(id = R.string.hint_password),
showDescription = {true},
informationDescription = "8 ~ 16์ž, ์˜๋ฌธ์ž, ์ˆซ์ž, ํŠน์ˆ˜๋ฌธ์ž ํฌํ•จ",
descriptionType = DescriptionType.Information
Tmdhoon2 marked this conversation as resolved.
Show resolved Hide resolved
)
JobisTextField(
title = stringResource(id = R.string.check_password),
value = checkPassword,
onValueChange = onCheckPassword,
hint = stringResource(id = R.string.hint_check_password),

Tmdhoon2 marked this conversation as resolved.
Show resolved Hide resolved
)
}

5 changes: 5 additions & 0 deletions feature/signup/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<string name="input_personal_information">๊ฐœ์ธ์ •๋ณด๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”</string>
<string name="input_email">์ด๋ฉ”์ผ์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”</string>
<string name="setting_password">๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์„ค์ •ํ•ด์ฃผ์„ธ์š”</string>
<string name="name">์ด๋ฆ„</string>
<string name="hint_name">ํ™๊ธธ๋™</string>
<string name="student_number">ํ•™๋ฒˆ</string>
Expand All @@ -12,4 +13,8 @@
<string name="hint_email">example</string>
<string name="authentication_code">์ธ์ฆ์ฝ”๋“œ</string>
<string name="hint_authentication_code">์ด๋ฉ”์ผ๋กœ ์˜จ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”</string>
<string name="password">๋น„๋ฐ€๋ฒˆํ˜ธ</string>
<string name="hint_password">๊ณ„์ •์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์„ค์ •ํ•ด์ฃผ์„ธ์š”.</string>
<string name="check_password">๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธ</string>
<string name="hint_check_password">์œ„ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ํ•œ ๋ฒˆ ๋” ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.</string>
</resources>
Loading