Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 4 additions & 11 deletions app/src/main/java/com/threegap/bitnagil/MainNavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.navigation.compose.composable
import androidx.navigation.toRoute
import com.threegap.bitnagil.navigation.home.HomeNavHost
import com.threegap.bitnagil.presentation.emotion.EmotionScreenContainer
import com.threegap.bitnagil.presentation.intro.IntroScreenContainer
import com.threegap.bitnagil.presentation.login.LoginScreenContainer
import com.threegap.bitnagil.presentation.onboarding.OnBoardingScreenContainer
import com.threegap.bitnagil.presentation.onboarding.OnBoardingViewModel
Expand All @@ -33,8 +32,8 @@ fun MainNavHost(
) {
composable<Route.Splash> {
SplashScreenContainer(
navigateToIntro = {
navigator.navController.navigate(Route.Intro) {
navigateToLogin = {
navigator.navController.navigate(Route.Login) {
popUpTo<Route.Splash> { inclusive = true }
}
},
Expand All @@ -52,12 +51,6 @@ fun MainNavHost(
)
}

composable<Route.Intro> {
IntroScreenContainer(
navigateToLogin = { navigator.navController.navigate(Route.Login) },
)
}

composable<Route.Login> {
LoginScreenContainer(
navigateToHome = navigator::navigateToHomeAndClearStack,
Expand Down Expand Up @@ -166,8 +159,8 @@ fun MainNavHost(
),
)
},
navigateToIntro = {
navigator.navController.navigate(Route.Intro) {
navigateToLogin = {
navigator.navController.navigate(Route.Login) {
popUpTo(0) {
inclusive = true
}
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/com/threegap/bitnagil/Route.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ sealed interface Route {
@Serializable
data object Splash : Route

@Serializable
data object Intro : Route

@Serializable
data object TermsAgreement : Route

Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private fun LoginScreen(
val screenWidth = with(LocalDensity.current) {
windowInfo.containerSize.width.toDp()
}
val widthRatio = 260f / 360f
val widthRatio = 290f / 360f

Column(
horizontalAlignment = Alignment.CenterHorizontally,
Expand All @@ -85,27 +85,27 @@ private fun LoginScreen(
.background(BitnagilTheme.colors.white)
.statusBarsPadding(),
) {
Spacer(modifier = Modifier.height(screenHeight * 0.105f))
Spacer(modifier = Modifier.height(screenHeight * 0.114f))

Text(
text = "빛나길에 오신걸 환영해요!",
color = BitnagilTheme.colors.navy500,
style = BitnagilTheme.typography.title2Bold,
textAlign = TextAlign.Center,
text = "안녕! 저는 포모예요\n함께 빛나길을 시작해볼까요?",
color = BitnagilTheme.colors.coolGray10,
style = BitnagilTheme.typography.title1Bold,
textAlign = TextAlign.Start,
modifier = Modifier
.fillMaxWidth()
.height(60.dp),
.padding(start = 20.dp),
)

Spacer(modifier = Modifier.height(screenHeight * 0.136f))
Spacer(modifier = Modifier.height(screenHeight * 0.112f))

Image(
painter = painterResource(R.drawable.intro_character),
painter = painterResource(R.drawable.login_fomo),
contentDescription = null,
contentScale = ContentScale.Fit,
modifier = Modifier
.width(screenWidth * widthRatio)
.aspectRatio(260f / 295f),
.aspectRatio(290f / 305f),
)

Spacer(modifier = Modifier.weight(1f))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ fun SettingScreenContainer(
navigateToBack: () -> Unit,
navigateToTermsOfService: () -> Unit,
navigateToPrivacyPolicy: () -> Unit,
navigateToIntro: () -> Unit,
navigateToLogin: () -> Unit,
) {
val state by viewModel.stateFlow.collectAsState()

viewModel.sideEffectFlow.collectAsEffect { sideEffect ->
when (sideEffect) {
SettingSideEffect.NavigateToIntro -> navigateToIntro()
SettingSideEffect.NavigateToLogin -> navigateToLogin()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SettingViewModel @Inject constructor(
}

SettingIntent.LogoutSuccess -> {
sendSideEffect(SettingSideEffect.NavigateToIntro)
sendSideEffect(SettingSideEffect.NavigateToLogin)
return null
}
SettingIntent.LogoutLoading -> {
Expand All @@ -67,7 +67,7 @@ class SettingViewModel @Inject constructor(
return state.copy(loading = false)
}
SettingIntent.WithdrawalSuccess -> {
sendSideEffect(SettingSideEffect.NavigateToIntro)
sendSideEffect(SettingSideEffect.NavigateToLogin)
return null
}
SettingIntent.WithdrawalLoading -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package com.threegap.bitnagil.presentation.setting.model.mvi
import com.threegap.bitnagil.presentation.common.mviviewmodel.MviSideEffect

sealed class SettingSideEffect : MviSideEffect {
data object NavigateToIntro : SettingSideEffect()
data object NavigateToLogin : SettingSideEffect()
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ import org.orbitmvi.orbit.compose.collectSideEffect

@Composable
fun SplashScreenContainer(
navigateToIntro: () -> Unit,
navigateToLogin: () -> Unit,
navigateToTermsAgreement: () -> Unit,
navigateToOnboarding: () -> Unit,
navigateToHome: () -> Unit,
viewModel: SplashViewModel = hiltViewModel(),
) {
viewModel.collectSideEffect { sideEffect ->
when (sideEffect) {
is SplashSideEffect.NavigateToIntro -> navigateToIntro()
is SplashSideEffect.NavigateToLogin -> navigateToLogin()
is SplashSideEffect.NavigateToTermsAgreement -> navigateToTermsAgreement()
is SplashSideEffect.NavigateToOnboarding -> navigateToOnboarding()
is SplashSideEffect.NavigateToHome -> navigateToHome()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class SplashViewModel @Inject constructor(
)
}

is SplashIntent.NavigateToIntro -> {
sendSideEffect(SplashSideEffect.NavigateToIntro)
is SplashIntent.NavigateToLogin -> {
sendSideEffect(SplashSideEffect.NavigateToLogin)
null
}

Expand Down Expand Up @@ -88,7 +88,7 @@ class SplashViewModel @Inject constructor(
UserRole.GUEST -> sendIntent(SplashIntent.NavigateToTermsAgreement)
UserRole.USER -> sendIntent(SplashIntent.NavigateToHome)
UserRole.ONBOARDING -> sendIntent(SplashIntent.NavigateToOnboarding)
else -> sendIntent(SplashIntent.NavigateToIntro)
else -> sendIntent(SplashIntent.NavigateToLogin)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.threegap.bitnagil.presentation.common.mviviewmodel.MviIntent

sealed class SplashIntent : MviIntent {
data class SetUserRole(val userRole: UserRole?) : SplashIntent()
data object NavigateToIntro : SplashIntent()
data object NavigateToLogin : SplashIntent()
data object NavigateToHome : SplashIntent()
data object NavigateToTermsAgreement : SplashIntent()
data object NavigateToOnboarding : SplashIntent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.threegap.bitnagil.presentation.splash.model
import com.threegap.bitnagil.presentation.common.mviviewmodel.MviSideEffect

sealed interface SplashSideEffect : MviSideEffect {
data object NavigateToIntro : SplashSideEffect
data object NavigateToLogin : SplashSideEffect
data object NavigateToHome : SplashSideEffect
data object NavigateToTermsAgreement : SplashSideEffect
data object NavigateToOnboarding : SplashSideEffect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private fun TermsAgreementScreen(
Spacer(modifier = Modifier.weight(1f))

BitnagilTextButton(
text = "시작하기",
text = "다음",
onClick = onStartButtonClick,
enabled = uiState.submitEnabled,
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -48,8 +49,9 @@ fun TermsAgreementItem(
.clickableWithoutRipple { onCheckedChange() },
) {
BitnagilIcon(
id = R.drawable.ic_check,
tint = if (isChecked) BitnagilTheme.colors.navy500 else BitnagilTheme.colors.navy100,
id = R.drawable.ic_check_md,
tint = if (isChecked) BitnagilTheme.colors.orange500 else BitnagilTheme.colors.coolGray90,
modifier = Modifier.size(20.dp),
)

Text(
Expand Down
Loading