Skip to content

Commit

Permalink
[feat/#76] nav graph + route 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnseo committed Feb 5, 2024
1 parent dfcf58a commit 052db4e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import com.kusitms.presentation.model.signIn.SignInRequestViewModel
import com.kusitms.presentation.model.signIn.SignInViewModel
import com.kusitms.presentation.model.signIn.SplashViewModel
import com.kusitms.presentation.ui.home.HomeScreen
import com.kusitms.presentation.ui.home.attend.AttendScreen
import com.kusitms.presentation.ui.home.profile.MyProfileScreen
import com.kusitms.presentation.ui.home.team.HomeTeamDetailScreen
import com.kusitms.presentation.ui.login.LoginScreen
Expand Down Expand Up @@ -230,6 +231,10 @@ fun MainNavigation() {
)
}

kusitmsComposableWithAnimation(NavRoutes.AttendanceScreen.route) {
AttendScreen()
}

//HomeScreen
kusitmsComposableWithAnimation(NavRoutes.HomeScreen.route) {
HomeScreen(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ sealed class NavRoutes(
fun createRoute(teamId: Int, curriculumName: String) = "HomeTeamDetail/${teamId}/${curriculumName}"
}

object AttendanceScreen: NavRoutes("Attendance")


object SettingMember : NavRoutes("SettingMember")
object SettingNonMember : NavRoutes("SettingNonMember")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ fun AttendBtnOn() {
}
}

@Preview
@Composable
fun AttendBtnOff() {
Button(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.FloatingActionButton
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
Expand All @@ -40,22 +35,29 @@ import kotlinx.coroutines.launch
fun AttendScreen(
) {
val scrollState = rememberScrollState()
Column(
Box(
modifier = Modifier
.fillMaxSize()
.verticalScroll(scrollState)
.background(color = KusitmsColorPalette.current.Grey900)
.padding(horizontal = 16.dp),
horizontalAlignment = Alignment.Start,
verticalArrangement = Arrangement.Top
.background(color = KusitmsColorPalette.current.Grey800) // 배경색을 Grey800으로 적용
) {
AttendTopBar()
KusitmsMarginVerticalSpacer(size = 8)
AttendPreColumn()
KusitmsMarginVerticalSpacer(size = 24)
AttendRecordColumn()
KusitmsMarginVerticalSpacer(size = 32)
AttendNotAttend()
Column(
modifier = Modifier
.wrapContentHeight()
.fillMaxWidth()
.background(color = KusitmsColorPalette.current.Grey900),
horizontalAlignment = Alignment.Start,
verticalArrangement = Arrangement.Top
) {
AttendTopBar()
KusitmsMarginVerticalSpacer(size = 8)
AttendPreColumn()
KusitmsMarginVerticalSpacer(size = 24)
AttendRecordColumn()
KusitmsMarginVerticalSpacer(size = 32)
AttendNotAttend()
Spacer(modifier = Modifier.weight(1f).background(color = KusitmsColorPalette.current.Grey800))
}
}
ScrollBtn(scrollState = scrollState)
}
Expand All @@ -65,6 +67,7 @@ fun AttendTopBar() {
Column(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp)
.height(48.dp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.Start
Expand All @@ -81,6 +84,7 @@ fun AttendTopBar() {
fun AttendPreColumn() {
Box(modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp)
.height(108.dp)
.background(color = KusitmsColorPalette.current.Grey800, shape = RoundedCornerShape(24.dp))
) {
Expand All @@ -94,9 +98,11 @@ fun AttendPreColumn() {
Column(
modifier = Modifier
.width(188.dp)
.height(56.dp)
.height(56.dp),
verticalArrangement = Arrangement.Center
) {
Text(text = stringResource(R.string.attend_box1_title), style = KusitmsTypo.current.Caption1, color = KusitmsColorPalette.current.Main500)
KusitmsMarginVerticalSpacer(size = 4)
Text(text = stringResource(R.string.attend_box1_subTitle), style = KusitmsTypo.current.SubTitle1_Semibold, color = KusitmsColorPalette.current.White)
}
AttendBtnOff()
Expand All @@ -109,6 +115,7 @@ fun AttendRecordColumn() {
Box(modifier = Modifier
.fillMaxWidth()
.height(266.dp)
.padding(horizontal = 20.dp)
.background(color = KusitmsColorPalette.current.Grey800, shape = RoundedCornerShape(24.dp))){

Column(
Expand Down Expand Up @@ -165,11 +172,14 @@ fun AttendNotComplete() {

@Composable
fun AttendNotAttend() {
KusitmsMarginVerticalSpacer(size = 88)
Box(modifier = Modifier
Column(modifier = Modifier
.fillMaxWidth()
.wrapContentHeight()) {
Text(text = stringResource(R.string.attend_not_attend), style = KusitmsTypo.current.Caption1, color = KusitmsColorPalette.current.Grey400, modifier = Modifier.align(Alignment.Center))
.background(color = KusitmsColorPalette.current.Grey800),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
KusitmsMarginVerticalSpacer(size = 88)
Text(text = stringResource(R.string.attend_not_attend), style = KusitmsTypo.current.Caption1, color = KusitmsColorPalette.current.Grey400)
}
}

Expand Down

0 comments on commit 052db4e

Please sign in to comment.