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
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import com.dhc.intro.start.IntroRoute
import com.dhc.missionstatus.MissionStatusRoute
import com.dhc.mypage.MyPageRoute
import com.dhc.reward.RewardRoute
import com.dhc.reward.yearfortune.YearFortuneRoute
import com.example.survey.SurveyRoute

@Composable
Expand Down Expand Up @@ -128,7 +129,9 @@ fun DhcNavHost(
}

composable(DhcRoute.MAIN_REWARD.route) {
RewardRoute()
RewardRoute(
navigateToYearFortune = { navController.navigateTo(DhcRoute.YEAR_FORTUNE) },
)
}

composable(DhcRoute.MAIN_MY.route) {
Expand All @@ -155,5 +158,8 @@ fun DhcNavHost(
navigateToPrevScreen = { navController.navigateUp() },
)
}
composable(DhcRoute.YEAR_FORTUNE.route) {
YearFortuneRoute()
}
}
}
10 changes: 10 additions & 0 deletions app/src/main/java/com/dhc/dhcandroid/navigation/DhcRoute.kt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ enum class DhcRoute(
route = DhcRouteConst.FORTUNE_SURVEY,
screenConfig = ScreenConfig(),
),
YEAR_FORTUNE(
route = DhcRouteConst.YEAR_FORTUNE,
screenConfig = ScreenConfig(
topBarState = DhcTopBarState.Basic(
title = "1년 운세",
isShowBackButton = true,
),
bottomBarState = DhcBottomBarState.None,
),
),
NONE(
route = DhcRouteConst.NONE,
screenConfig = ScreenConfig(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ object DhcRouteConst {
const val MAIN_MY = "main/my"
const val HOME_MONETARY_DETAIL = "home/monetaryDetail"
const val FORTUNE_SURVEY = "fortuneSurvey"
const val YEAR_FORTUNE = "reward/yearFortune"
const val NONE = "none"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
Expand All @@ -38,7 +39,9 @@ import com.dhc.designsystem.getSvgImageLoader
@Composable
fun DhcTipCard(
tipCardItem: TipCardModel,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
contentTextStyle: TextStyle = DhcTypoTokens.TitleH3,
contentTextAlign: TextAlign = TextAlign.Center,
) {
Column(
modifier = modifier
Expand All @@ -53,7 +56,9 @@ fun DhcTipCard(
Spacer(modifier = Modifier.height(8.dp))
TipCardContent(
color = tipCardItem.color,
content = tipCardItem.cont
content = tipCardItem.cont,
textAlign = contentTextAlign,
textStyle = contentTextStyle
)
}
}
Expand Down Expand Up @@ -140,6 +145,8 @@ fun TipCardTitle(
fun TipCardContent(
color: String?,
content: String,
textStyle: TextStyle = DhcTypoTokens.TitleH3,
textAlign: TextAlign = TextAlign.Center,
modifier: Modifier = Modifier,
) {
val dhcColor = LocalDhcColors.current
Expand All @@ -159,9 +166,9 @@ fun TipCardContent(

Text(
text = content,
style = DhcTypoTokens.TitleH3,
style = textStyle,
color = if (color.isNotNullOrEmpty()) hexToColor(color) else dhcColor.text.textBodyPrimary,
textAlign = TextAlign.Center,
textAlign = textAlign,
)
}
}
Expand Down
22 changes: 22 additions & 0 deletions core/designsystem/src/main/res/drawable/ico_lock.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="28dp"
android:height="28dp"
android:viewportWidth="28"
android:viewportHeight="28">
<group>
<clip-path
android:pathData="M0,0h28v28h-28z"/>
<path
android:pathData="M19.921,12.455H8.068V7.759C8.068,4.492 10.727,1.833 13.995,1.833C17.262,1.833 19.921,4.492 19.921,7.759V12.455ZM10.168,10.355H17.821V7.759C17.821,5.649 16.104,3.933 13.995,3.933C11.885,3.933 10.168,5.649 10.168,7.759V10.355Z"
android:fillColor="#5D6470"/>
<path
android:pathData="M21.694,9.159H6.294C4.748,9.159 3.494,10.413 3.494,11.959V22.459C3.494,24.006 4.748,25.259 6.294,25.259H21.694C23.24,25.259 24.494,24.006 24.494,22.459V11.959C24.494,10.413 23.24,9.159 21.694,9.159Z"
android:fillColor="#7B8696"/>
<path
android:pathData="M13.995,17.589C15.154,17.589 16.094,16.649 16.094,15.489C16.094,14.329 15.154,13.389 13.995,13.389C12.835,13.389 11.894,14.329 11.894,15.489C11.894,16.649 12.835,17.589 13.995,17.589Z"
android:fillColor="#2A2F38"/>
<path
android:pathData="M13.995,20.913C13.415,20.913 12.945,20.443 12.945,19.863V16.072C12.945,15.492 13.415,15.021 13.995,15.021C14.576,15.021 15.045,15.492 15.045,16.072V19.863C15.045,20.443 14.576,20.913 13.995,20.913Z"
android:fillColor="#2A2F38"/>
</group>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.dhc.reward

class RewardContract {
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import androidx.compose.ui.Modifier
@Composable
fun RewardRoute(
modifier: Modifier = Modifier,
navigateToYearFortune: () -> Unit = {},
) {
RewardScreen(modifier = modifier)
RewardScreen(
modifier = modifier,
navigateToYearFortune = navigateToYearFortune
)
}

Loading