Skip to content

Commit

Permalink
[FIX]#111: 회원가입 문제 수정해요
Browse files Browse the repository at this point in the history
  • Loading branch information
flash159483 committed Aug 19, 2024
1 parent 6ddb807 commit aa2b97e
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import androidx.compose.ui.unit.dp
import com.bff.wespot.designsystem.theme.Gray900

@Composable
fun ListBottomGradient() {
fun ListBottomGradient(
height: Int = 70,
) {
Box(
modifier = Modifier
.fillMaxWidth()
.height(70.dp)
.height(height.dp)
.background(
brush = Brush.verticalGradient(
colors = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.bff.wespot.auth.screen

import androidx.annotation.DrawableRes
import androidx.annotation.RawRes
import androidx.annotation.StringRes
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
Expand Down Expand Up @@ -65,34 +66,36 @@ fun AuthScreen(
AuthCarouselItem.entries[it].resId,
),
)
Box(modifier = Modifier.fillMaxWidth()) {
Image(
painter = painterResource(id = AuthCarouselItem.entries[it].background),
contentDescription = stringResource(R.string.onboarding_background),
modifier = Modifier
.fillMaxWidth()
.aspectRatio(1f),
)
Column {
Box(modifier = Modifier.fillMaxWidth()) {
Image(
painter = painterResource(id = AuthCarouselItem.entries[it].background),
contentDescription = stringResource(R.string.onboarding_background),
modifier = Modifier
.fillMaxWidth()
.aspectRatio(1f),
)

LottieAnimation(
composition = composition,
iterations = LottieConstants.IterateForever,
modifier = Modifier
.fillMaxWidth()
.aspectRatio(1f),
)
}
}
LottieAnimation(
composition = composition,
iterations = LottieConstants.IterateForever,
modifier = Modifier
.fillMaxWidth()
.aspectRatio(1f),
)
}

Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) {
Text(
text = stringResource(R.string.onboarding1),
style = StaticTypeScale.Default.body2,
textAlign = TextAlign.Center,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp, vertical = 6.dp),
)
Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) {
Text(
text = stringResource(id = AuthCarouselItem.entries[it].title),
style = StaticTypeScale.Default.body2,
textAlign = TextAlign.Center,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp, vertical = 6.dp),
)
}
}
}

Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) {
Expand Down Expand Up @@ -136,8 +139,9 @@ fun AuthScreen(
private enum class AuthCarouselItem(
@RawRes val resId: Int,
@DrawableRes val background: Int,
@StringRes val title: Int,
) {
FIRST(R.raw.onboarding01, R.drawable.onboarding_01_bkg),
SignUp(R.raw.onboarding02, R.drawable.onboarding_02_bkg),
Welcome(R.raw.onboarding03, R.drawable.onboarding_03_bkg),
FIRST(R.raw.onboarding01, R.drawable.onboarding_01_bkg, R.string.onboarding1),
SignUp(R.raw.onboarding02, R.drawable.onboarding_02_bkg, R.string.onboarding2),
Welcome(R.raw.onboarding03, R.drawable.onboarding_03_bkg, R.string.onboarding3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.activity.compose.BackHandler
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -58,15 +59,23 @@ fun CompleteScreen(

Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.BottomCenter) {
Column {
WSButton(onClick = {
navigator.navigateToSharing(context)
}, text = stringResource(id = R.string.invite_friend_and_start)) {
WSButton(
onClick = {
navigator.navigateToSharing(context)
},
text = stringResource(id = R.string.invite_friend_and_start),
paddingValues = PaddingValues(horizontal = 20.dp, vertical = 8.dp),
) {
it.invoke()
}

WSOutlineButton(onClick = {
viewModel.onAction(AuthAction.Signup)
}, text = stringResource(id = R.string.start)) {
WSOutlineButton(
onClick = {
viewModel.onAction(AuthAction.Signup)
},
text = stringResource(id = R.string.start),
paddingValues = PaddingValues(horizontal = 20.dp, vertical = 8.dp),
) {
it.invoke()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ 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.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -226,6 +227,7 @@ private fun ConfirmBottomSheetContent(
painter = painterResource(id = R.drawable.profile),
contentDescription = "Icon",
modifier = Modifier.size(56.dp),
tint = Color.Unspecified,
)
Column {
Text(
Expand Down Expand Up @@ -338,7 +340,7 @@ private fun RegisterBottomSheetContent(

Column(
verticalArrangement = Arrangement.spacedBy(30.dp),
modifier = Modifier.padding(top = 14.dp, bottom = 38.dp, start = 30.dp, end = 36.dp),
modifier = Modifier.padding(top = 14.dp, bottom = 38.dp, start = 30.dp, end = 20.dp),
) {
TermRow(
title = stringResource(id = R.string.service_term),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ fun NameScreen(
)

Row(
modifier = Modifier.fillMaxWidth(),
modifier = Modifier
.fillMaxWidth()
.padding(start = 10.dp),
horizontalArrangement = Arrangement.SpaceBetween,
) {
if (state.hasProfanity) {
Expand Down Expand Up @@ -145,7 +147,7 @@ fun NameScreen(
R.string.next
},
),
enabled = state.name.length > 1 && error.not(),
enabled = state.name.length > 1 && error.not() && state.hasProfanity.not(),
) {
it.invoke()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
Expand All @@ -25,6 +26,7 @@ import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.zIndex
import androidx.paging.LoadState
import androidx.paging.compose.collectAsLazyPagingItems
import com.bff.wespot.auth.R
Expand All @@ -39,6 +41,7 @@ import com.bff.wespot.designsystem.component.input.WsTextField
import com.bff.wespot.designsystem.component.input.WsTextFieldType
import com.bff.wespot.designsystem.theme.StaticTypeScale
import com.bff.wespot.designsystem.theme.WeSpotThemeManager
import com.bff.wespot.ui.ListBottomGradient
import com.bff.wespot.ui.WSListItem
import com.ramcosta.composedestinations.annotation.Destination
import kotlinx.coroutines.delay
Expand Down Expand Up @@ -156,16 +159,21 @@ fun SchoolScreen(
)
}
}
item {
Spacer(modifier = Modifier.height(70.dp))
}
}
}

}
}
}

Box(
modifier = Modifier
.fillMaxSize()
.imePadding(),
.imePadding()
.zIndex(2f),
contentAlignment = Alignment.BottomCenter,
) {
WSButton(
Expand All @@ -187,6 +195,15 @@ fun SchoolScreen(
) {
it()
}

}

Box(
modifier = Modifier
.fillMaxSize()
.zIndex(1f), contentAlignment = Alignment.BottomCenter
) {
ListBottomGradient(height = 120)
}

LaunchedEffect(focusRequester) {
Expand Down
2 changes: 2 additions & 0 deletions feature/auth/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="onboarding1">위스팟 행성에 오신 것을 환영해요!\n오래 전부터 기다리고 있었어요</string>
<string name="onboarding2">친구들과 함께 투표에 참여하고\n서로에 대해 알아가 볼까요?</string>
<string name="onboarding3">매일 저녁 딱 세 통만 보낼 수 있는\n비밀 쪽지로 마음을 표현해 볼까요?</string>
<string name="onboarding_background">온보딩 배경</string>
<string name="register_done">회원가입 완료</string>
</resources>

0 comments on commit aa2b97e

Please sign in to comment.