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 @@ -40,6 +40,7 @@ fun DateRoadCourseCard(
Row(
modifier = modifier
.fillMaxWidth()
.padding(end = 16.dp)
.height(130.dp)
.background(DateRoadTheme.colors.white)
.noRippleClickable(onClick = { onClick(course.courseId) })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand All @@ -30,7 +31,9 @@ fun DateRoadEmptyView(
verticalArrangement = Arrangement.Center
) {
Image(
modifier = Modifier.fillMaxWidth(),
modifier = Modifier
.height(383.dp)
.fillMaxWidth(),
painter = painterResource(id = emptyViewType.imageRes),
contentDescription = null,
contentScale = ContentScale.FillWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class EnrollContract {
val timePickers: List<Picker> = listOf(
Picker(items = listOf(TimePicker.AM, TimePicker.PM)),
Picker(items = (HOUR_START..HOUR_END).map { it.toString() }),
Picker(items = (MINUTE_START..MINUTE_END).map { it.toString().padStart(2, '0') })
Picker(
items = (MINUTE_START..MINUTE_END step 5).map { it.toString().padStart(2, '0') }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

step5 굳굳~!

)
),
val isRegionBottomSheetOpen: Boolean = false,
val onRegionBottomSheetRegionSelected: RegionType? = RegionType.SEOUL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import org.sopt.teamdateroad.R
import org.sopt.teamdateroad.presentation.ui.component.textfield.DateRoadBasicTextField
import org.sopt.teamdateroad.presentation.ui.component.textfield.DateRoadTextArea
import org.sopt.teamdateroad.presentation.util.view.LoadState
import org.sopt.teamdateroad.presentation.util.view.NumberCommaTransformation
import org.sopt.teamdateroad.ui.theme.DATEROADTheme

@Composable
Expand Down Expand Up @@ -45,7 +46,8 @@ fun EnrollThirdScreen(
onValueChange = { newValue ->
if (newValue.all { it.isDigit() }) onCostValueChange(newValue)
},
keyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Number)
keyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Number),
visualTransformation = NumberCommaTransformation()
)
Spacer(modifier = Modifier.height(6.dp))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package org.sopt.teamdateroad.presentation.ui.enroll.component

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
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.padding
Expand Down Expand Up @@ -73,13 +72,13 @@ fun PlaceSearchBottomSheet(
.clip(RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp))
.background(DateRoadTheme.colors.white)
) {
Spacer(modifier = Modifier.height(23.dp))
Spacer(modifier = Modifier.height(15.dp))

Row(
modifier = Modifier
.fillMaxWidth()
.height(40.dp)
.padding(start = 25.dp, end = 12.dp),
.padding(start = 16.dp, end = 6.dp),
verticalAlignment = Alignment.CenterVertically
) {
Text(
Expand All @@ -100,15 +99,15 @@ fun PlaceSearchBottomSheet(
)
}

Spacer(modifier = Modifier.height(22.dp))
Spacer(modifier = Modifier.height(16.dp))

TextField(
value = searchKeyword,
onValueChange = onKeywordChanged,
modifier = Modifier
.fillMaxWidth()
.height(54.dp)
.padding(start = 14.dp, end = 20.dp),
.padding(horizontal = 14.dp),
placeholder = {
Text(
modifier = Modifier,
Expand Down Expand Up @@ -147,10 +146,11 @@ fun PlaceSearchBottomSheet(
)
)

Spacer(modifier = Modifier.height(10.dp))

if (searchPlaceInfos.isNotEmpty()) {
LazyColumn(modifier = Modifier.weight(1f)) {
item {
Spacer(modifier = Modifier.height(10.dp))
}
itemsIndexed(searchPlaceInfos) { index: Int, placeInfo: PlaceInfo ->
EnrollPlaceSearchItem(
keyword = searchKeyword,
Expand All @@ -166,8 +166,10 @@ fun PlaceSearchBottomSheet(
)
}
}
item {
Spacer(modifier = Modifier.height(12.dp))
}
}
Spacer(modifier = Modifier.height(12.dp))
} else {
EmptyPlaceSearchResult()
}
Expand All @@ -178,26 +180,26 @@ fun PlaceSearchBottomSheet(

@Composable
private fun EmptyPlaceSearchResult() {
Box(
Column(
modifier = Modifier
.fillMaxSize()
.padding(bottom = 70.dp)
.height(472.dp)
.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Column(modifier = Modifier.align(Alignment.Center)) {
Image(
modifier = Modifier
.width(167.dp)
.height(191.dp),
painter = painterResource(R.drawable.img_place_search_no_match),
contentDescription = null
)
Spacer(modifier = Modifier.height(40.dp))
Text(
text = stringResource(R.string.enroll_place_search_no_match),
color = DateRoadTheme.colors.gray300,
style = DateRoadTheme.typography.titleBold18
)
}
Image(
modifier = Modifier
.width(167.dp)
.height(191.dp),
painter = painterResource(R.drawable.img_place_search_no_match),
contentDescription = null
)
Spacer(modifier = Modifier.height(38.dp))
Text(
text = stringResource(R.string.enroll_place_search_no_match),
color = DateRoadTheme.colors.gray300,
style = DateRoadTheme.typography.titleBold18
)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package org.sopt.teamdateroad.presentation.ui.home.component

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
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.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
Expand All @@ -24,23 +25,26 @@ fun DateRoadHomeTopBar(
profileImage: String? = null,
onClick: () -> Unit = {}
) {
Row(
Box(
modifier = Modifier
.fillMaxWidth()
.height(54.dp)
.background(Color.Transparent)
.padding(horizontal = 22.dp, vertical = 10.dp),
verticalAlignment = Alignment.CenterVertically
.padding(start = 11.dp, end = 16.dp)
) {
Icon(
painter = painterResource(id = R.drawable.ic_dateroad_logo),
contentDescription = null,
tint = DateRoadTheme.colors.white
tint = DateRoadTheme.colors.white,
modifier = Modifier
.align(Alignment.CenterStart)
.size(54.dp)
)
Spacer(modifier = Modifier.weight(1f))
DateRoadPointTag(
text = title,
profileImage = profileImage,
onClick = onClick
onClick = onClick,
modifier = Modifier.align(Alignment.CenterEnd)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,16 @@ fun LookScreen(
)
}
}
Spacer(modifier = Modifier.height(20.dp))
Spacer(modifier = Modifier.height(10.dp))
if (lookUiState.courses.isEmpty()) {
Box(
modifier = Modifier
.fillMaxSize()
.fillMaxSize(),
contentAlignment = Alignment.TopCenter
) {
DateRoadEmptyView(emptyViewType = EmptyViewType.LOOK)
DateRoadEmptyView(
emptyViewType = EmptyViewType.LOOK
)
}
}
LazyVerticalGrid(
Expand All @@ -231,6 +234,9 @@ fun LookScreen(
horizontalArrangement = Arrangement.spacedBy(12.dp),
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
item {
Spacer(modifier = Modifier.height(10.dp))
}
items(lookUiState.courses.size) { index ->
LookCourseCard(course = lookUiState.courses[index], onClick = { onCourseCardClicked(lookUiState.courses[index].courseId) })
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.sopt.teamdateroad.presentation.ui.mycourse
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
Expand Down Expand Up @@ -116,28 +117,33 @@ fun MyCourseScreen(
backGroundColor = DateRoadTheme.colors.white,
onLeftIconClick = onIconClick
)
LazyColumn {
if (myCourseUiState.courses.isEmpty()) {
item {
DateRoadEmptyView(
emptyViewType = when (myCourseUiState.myCourseType) {
MyCourseType.ENROLL -> EmptyViewType.MY_COURSE_ENROLL
MyCourseType.READ -> EmptyViewType.MY_COURSE_READ
if (myCourseUiState.courses.isEmpty()) {
Column(
modifier = Modifier.fillMaxSize()
) {
Spacer(modifier = Modifier.weight(60f))
DateRoadEmptyView(
emptyViewType = when (myCourseUiState.myCourseType) {
MyCourseType.ENROLL -> EmptyViewType.MY_COURSE_ENROLL
MyCourseType.READ -> EmptyViewType.MY_COURSE_READ
}
)
Spacer(modifier = Modifier.weight(165f))
}
} else {
LazyColumn {
items(myCourseUiState.courses) { course ->
DateRoadCourseCard(
course = course,
onClick = {
when (myCourseUiState.myCourseType) {
MyCourseType.ENROLL -> navigateToCourseDetail(course.courseId)
MyCourseType.READ -> navigateToEnroll(course.courseId)
}
}
)
}
}
items(myCourseUiState.courses) { course ->
DateRoadCourseCard(
course = course,
onClick = {
when (myCourseUiState.myCourseType) {
MyCourseType.ENROLL -> navigateToCourseDetail(course.courseId)
MyCourseType.READ -> navigateToEnroll(course.courseId)
}
}
)
}
}
}
}
Expand All @@ -150,7 +156,7 @@ fun MyCourseScreenPreview() {
padding = PaddingValues(0.dp),
myCourseUiState = MyCourseContract.MyCourseUiState(
loadState = LoadState.Success,
myCourseType = MyCourseType.READ,
myCourseType = MyCourseType.ENROLL,
courses = listOf(
Course(
courseId = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
Expand Down Expand Up @@ -93,7 +94,11 @@ fun PastScreen(
onLeftIconClick = popBackStack
)
if (pastUiState.timelines.isEmpty()) {
DateRoadEmptyView(emptyViewType = EmptyViewType.PAST)
Column(modifier = Modifier.fillMaxSize()) {
Spacer(modifier = Modifier.weight(69f))
DateRoadEmptyView(emptyViewType = EmptyViewType.PAST)
Spacer(modifier = Modifier.weight(165f))
}
} else {
LazyColumn(
modifier = Modifier.padding(start = 16.dp, end = 16.dp, top = 6.dp, bottom = 11.dp),
Expand Down
Loading