diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signin/SignInBottomSheet.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signin/SignInBottomSheet.kt index 7ed805e9..5185c068 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signin/SignInBottomSheet.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signin/SignInBottomSheet.kt @@ -22,11 +22,13 @@ import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.wap.designsystem.WappTheme +import com.wap.wapp.feature.auth.R @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -46,7 +48,7 @@ fun signInBottomSheet() { ) { Text( modifier = Modifier.align(Alignment.CenterHorizontally), - text = "로그인", + text = stringResource(id = R.string.sign_in), style = WappTheme.typography.contentMedium, color = WappTheme.colors.white, ) @@ -54,7 +56,7 @@ fun signInBottomSheet() { Spacer(modifier = Modifier.height(16.dp)) Text( - text = "이메일", + text = stringResource(id = R.string.sign_in_email), color = WappTheme.colors.white, style = WappTheme.typography.labelRegular, ) @@ -64,7 +66,9 @@ fun signInBottomSheet() { value = filledText, onValueChange = { filledText = it }, placeholder = { - Text(text = "Github Email") + Text( + text = stringResource(id = R.string.sign_in_email_hint), + ) }, keyboardOptions = KeyboardOptions( keyboardType = KeyboardType.Email, @@ -83,7 +87,7 @@ fun signInBottomSheet() { shape = RoundedCornerShape(10.dp), ) { Text( - text = "완료", + text = stringResource(id = R.string.done), style = WappTheme.typography.contentMedium, ) } @@ -97,7 +101,7 @@ fun signInBottomSheet() { Text( modifier = Modifier.fillMaxWidth(), textAlign = TextAlign.Center, - text = "이메일을 까먹었으셨나요?", + text = stringResource(id = R.string.sign_in_find_email), style = WappTheme.typography.captionMedium, color = WappTheme.colors.yellow, ) diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signin/SignInScreen.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signin/SignInScreen.kt index 447ab8fe..d4de7fcc 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signin/SignInScreen.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signin/SignInScreen.kt @@ -21,11 +21,13 @@ import androidx.compose.runtime.Composable 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.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.wap.designsystem.WappTheme import com.wap.wapp.core.designresource.R +import com.wap.wapp.feature.auth.R.string @Composable fun SignInScreen( @@ -43,10 +45,10 @@ fun SignInScreen( ) { Spacer(modifier = Modifier.height(32.dp)) Image( + painter = painterResource(id = R.drawable.img_white_cat), modifier = Modifier .align(Alignment.CenterHorizontally) .size(width = 230.dp, height = 230.dp), - painter = painterResource(id = R.drawable.ic_white_cat), contentDescription = "WAPP ICON", ) @@ -56,14 +58,14 @@ fun SignInScreen( Column { Spacer(modifier = Modifier.height(40.dp)) Text( - text = "WAPP", + text = stringResource(id = string.application_name), style = WappTheme.typography.titleBold, fontSize = 48.sp, color = WappTheme.colors.white, ) } Text( - text = "WAPP", + text = stringResource(id = string.application_name), fontSize = 48.sp, style = WappTheme.typography.titleBold, color = WappTheme.colors.yellow, @@ -83,13 +85,15 @@ fun SignInScreen( ) { Icon( painter = painterResource(id = R.drawable.ic_github), - contentDescription = "Github SignIn Icon", + contentDescription = stringResource( + id = string.sign_in_github_description, + ), modifier = Modifier.size(40.dp), tint = WappTheme.colors.black, ) Spacer(modifier = Modifier.width(16.dp)) Text( - text = "Github 로그인", + text = stringResource(id = string.sign_in_github_content), style = WappTheme.typography.contentMedium, ) } @@ -112,12 +116,14 @@ fun SignInScreen( ) { Icon( painter = painterResource(id = R.drawable.ic_balloon), - contentDescription = "Balloon Icon", + contentDescription = stringResource( + id = string.sign_in_non_member_description, + ), modifier = Modifier.size(40.dp), ) Spacer(modifier = Modifier.width(16.dp)) Text( - text = "비회원으로 둘러보기", + text = stringResource(id = string.sign_in_non_member_content), style = WappTheme.typography.contentMedium, color = WappTheme.colors.white, ) @@ -131,8 +137,8 @@ fun SignInScreen( @Preview @Composable fun previewSignInScreen() { - /*SignInScreen( - navigateToSignUp = { } + SignInScreen( + navigateToSignUp = { }, navigateToNotice = { }, - )*/ + ) } diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpChipGroup.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpChipGroup.kt new file mode 100644 index 00000000..ed9afb92 --- /dev/null +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpChipGroup.kt @@ -0,0 +1,53 @@ +package com.wap.wapp.feature.auth.signup + +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyRow +import androidx.compose.foundation.lazy.items +import androidx.compose.material.Text +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.FilterChip +import androidx.compose.material3.FilterChipDefaults +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.Modifier +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import com.wap.designsystem.WappTheme + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun SignUpChipGroup() { + val itemsList = listOf("1학기", "2학기") + + var selectedItem by remember { + mutableStateOf(itemsList[0]) // initially, first item is selected + } + + LazyRow(modifier = Modifier.fillMaxWidth()) { + items(itemsList) { item -> + FilterChip( + modifier = Modifier.padding(horizontal = 6.dp), + selected = (item == selectedItem), + onClick = { + selectedItem = item + }, + label = { + Text( + text = item, + color = WappTheme.colors.white, + style = WappTheme.typography.contentRegular, + textAlign = TextAlign.Center, + ) + }, + colors = FilterChipDefaults.filterChipColors( + containerColor = WappTheme.colors.black3, + selectedContainerColor = WappTheme.colors.yellow, + ), + ) + } + } +} diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt index fe0ed60e..b7e85827 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt @@ -12,8 +12,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width -import androidx.compose.foundation.lazy.LazyRow -import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.Icon @@ -23,17 +21,11 @@ import androidx.compose.material.TextField import androidx.compose.material.TextFieldDefaults import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.FilterChip -import androidx.compose.material3.FilterChipDefaults 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.text.input.KeyboardType import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview @@ -41,6 +33,9 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.wap.designsystem.WappTheme import com.wap.wapp.core.designresource.R +import com.wap.wapp.feature.auth.R.drawable.ic_card +import com.wap.wapp.feature.auth.R.drawable.ic_door +import com.wap.wapp.feature.auth.R.string @Composable fun SignUpScreen() { @@ -59,13 +54,13 @@ fun SignUpScreen() { ) { Image( painterResource(id = R.drawable.ic_back_btn), - contentDescription = "Back Button", + contentDescription = stringResource(id = string.back_button_description), modifier = Modifier .padding(vertical = 16.dp) .size(20.dp), ) Text( - text = "회원가입", + text = stringResource(id = string.sign_up), style = WappTheme.typography.titleBold, color = WappTheme.colors.white, fontSize = 20.sp, @@ -79,12 +74,12 @@ fun SignUpScreen() { Spacer(modifier = Modifier.height(32.dp)) Text( - text = "처음 가입하시네요!", + text = stringResource(id = string.sign_up_title), style = WappTheme.typography.titleBold, color = WappTheme.colors.white, ) Text( - text = "회원님의 정보를 입력해주세요.", + text = stringResource(id = string.sign_up_content), style = WappTheme.typography.contentMedium, color = WappTheme.colors.gray1, ) @@ -95,17 +90,23 @@ fun SignUpScreen() { verticalArrangement = Arrangement.spacedBy(32.dp), ) { SignUpTextField( - fieldName = "이름", - fieldHint = "이름을 입력해주세요.", - fieldSupportingText = "회원 확인을 위해, 실명을 입력해주세요.", + iconDescription = stringResource(id = string.sign_up_name_description), + fieldName = stringResource(id = string.sign_up_name_title), + fieldHint = stringResource(id = string.sign_up_name_hint), + fieldSupportingText = stringResource(id = string.sign_up_name_caption), fieldIcon = R.drawable.ic_profile, ) SignUpTextField( - fieldName = "학번", - fieldHint = "학번을 입력해주세요.", - fieldSupportingText = "동명이인을 구별하기 위해, 필요해요!", - fieldIcon = R.drawable.ic_card, + iconDescription = stringResource( + id = string.sign_up_student_id_description, + ), + fieldName = stringResource(id = string.sign_up_student_id_title), + fieldHint = stringResource(id = string.sign_up_student_id_hint), + fieldSupportingText = stringResource( + id = string.sign_up_student_id_caption, + ), + fieldIcon = ic_card, ) var dummyText = "" @@ -114,14 +115,16 @@ fun SignUpScreen() { verticalAlignment = Alignment.CenterVertically, ) { Icon( - painter = painterResource(id = R.drawable.ic_door), - contentDescription = "name Icon", + painter = painterResource(id = ic_door), + contentDescription = stringResource( + id = string.sign_up_registered_at_description, + ), tint = WappTheme.colors.white, modifier = Modifier.size(20.dp), ) Spacer(modifier = Modifier.width(8.dp)) Text( - text = "입부시기", + text = stringResource(id = string.sign_up_registered_at_title), color = WappTheme.colors.white, style = WappTheme.typography.contentBold, ) @@ -143,7 +146,9 @@ fun SignUpScreen() { ), placeholder = { Text( - text = "입부년도 입력", + text = stringResource( + id = string.sign_up_registered_at_hint, + ), color = WappTheme.colors.gray1, ) }, @@ -159,7 +164,7 @@ fun SignUpScreen() { Spacer(modifier = Modifier.height(8.dp)) Text( - text = "회원님의 기수 정보를 알려드릴게요!", + text = stringResource(id = string.sign_up_registered_at_caption), color = WappTheme.colors.yellow, style = WappTheme.typography.captionRegular, ) @@ -174,7 +179,7 @@ fun SignUpScreen() { shape = RoundedCornerShape(10.dp), ) { Text( - text = "완료", + text = stringResource(id = string.done), style = WappTheme.typography.contentMedium, color = WappTheme.colors.white, ) @@ -185,40 +190,6 @@ fun SignUpScreen() { } } -@OptIn(ExperimentalMaterial3Api::class) -@Composable -fun SignUpChipGroup() { - val itemsList = listOf("1학기", "2학기") - - var selectedItem by remember { - mutableStateOf(itemsList[0]) // initially, first item is selected - } - - LazyRow(modifier = Modifier.fillMaxWidth()) { - items(itemsList) { item -> - FilterChip( - modifier = Modifier.padding(horizontal = 6.dp), - selected = (item == selectedItem), - onClick = { - selectedItem = item - }, - label = { - Text( - text = item, - color = WappTheme.colors.white, - style = WappTheme.typography.contentRegular, - textAlign = TextAlign.Center, - ) - }, - colors = FilterChipDefaults.filterChipColors( - containerColor = WappTheme.colors.black3, - selectedContainerColor = WappTheme.colors.yellow, - ), - ) - } - } -} - @Preview @Composable fun previewSignUpScreen() { diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpTextField.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpTextField.kt index 6c8a89e9..f3a0e122 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpTextField.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpTextField.kt @@ -20,6 +20,7 @@ import com.wap.designsystem.WappTheme @Composable fun SignUpTextField( + iconDescription: String, fieldName: String, fieldHint: String, fieldSupportingText: String, @@ -32,7 +33,7 @@ fun SignUpTextField( ) { Icon( painter = painterResource(id = fieldIcon), - contentDescription = "name Icon", + contentDescription = iconDescription, tint = WappTheme.colors.white, modifier = Modifier.size(20.dp), )