From ad00639932ca7616c8b51f0e42cf812163c65e7c Mon Sep 17 00:00:00 2001 From: serioushyeon Date: Fri, 17 Jan 2025 05:50:41 +0900 Subject: [PATCH 1/2] =?UTF-8?q?#17=20[chore]=20:=20=EA=B3=B5=ED=86=B5=20st?= =?UTF-8?q?ring=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../findsuhyeon/component/DetailMeetingInformation.kt | 2 +- .../withsuhyeon/feature/main/component/MainBottomBar.kt | 2 +- app/src/main/res/values/strings.xml | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/sopt/withsuhyeon/feature/findsuhyeon/component/DetailMeetingInformation.kt b/app/src/main/java/com/sopt/withsuhyeon/feature/findsuhyeon/component/DetailMeetingInformation.kt index 4bfd4b47..4a606251 100644 --- a/app/src/main/java/com/sopt/withsuhyeon/feature/findsuhyeon/component/DetailMeetingInformation.kt +++ b/app/src/main/java/com/sopt/withsuhyeon/feature/findsuhyeon/component/DetailMeetingInformation.kt @@ -136,7 +136,7 @@ fun DetailMeetingInformation ( modifier = Modifier.fillMaxWidth() ) { Text( - text = stringResource(R.string.find_suhyeon_detail_meeting_price), + text = stringResource(R.string.find_suhyeon_price), style = typography.body03_R.merge(color = colors.Grey500) ) Text( diff --git a/app/src/main/java/com/sopt/withsuhyeon/feature/main/component/MainBottomBar.kt b/app/src/main/java/com/sopt/withsuhyeon/feature/main/component/MainBottomBar.kt index 0cc51ef6..d4b39ae0 100644 --- a/app/src/main/java/com/sopt/withsuhyeon/feature/main/component/MainBottomBar.kt +++ b/app/src/main/java/com/sopt/withsuhyeon/feature/main/component/MainBottomBar.kt @@ -52,12 +52,12 @@ fun MainBottomBar( enter = fadeIn() + slideIn { IntOffset(0, it.height) }, exit = fadeOut() + slideOut { IntOffset(0, it.height) } ) { + val borderColor = defaultWithSuhyeonColors.Grey200 Row( modifier = modifier .fillMaxWidth() .height(68.dp) .drawBehind { - val borderColor = defaultWithSuhyeonColors.Grey200 val borderThickness = 1.dp.toPx() drawLine( diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 387228f4..a35b2c71 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -47,12 +47,16 @@ 원하는 수현이 날짜 요구사항 - 금액 + 금액 위치 MultiSelectChip + + 채팅하기 + 대화 중인 채팅 + From 69960e5868e9013a6d10517d96a84ddedce73237 Mon Sep 17 00:00:00 2001 From: serioushyeon Date: Fri, 17 Jan 2025 05:51:03 +0900 Subject: [PATCH 2/2] =?UTF-8?q?#17=20[ui]=20:=20PostBottomBar=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/component/bottombar/PostBottomBar.kt | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 app/src/main/java/com/sopt/withsuhyeon/core/component/bottombar/PostBottomBar.kt diff --git a/app/src/main/java/com/sopt/withsuhyeon/core/component/bottombar/PostBottomBar.kt b/app/src/main/java/com/sopt/withsuhyeon/core/component/bottombar/PostBottomBar.kt new file mode 100644 index 00000000..ac3a04d3 --- /dev/null +++ b/app/src/main/java/com/sopt/withsuhyeon/core/component/bottombar/PostBottomBar.kt @@ -0,0 +1,102 @@ +package com.sopt.withsuhyeon.core.component.bottombar + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +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.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.drawBehind +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.sopt.withsuhyeon.R +import com.sopt.withsuhyeon.core.component.button.LargeButton +import com.sopt.withsuhyeon.core.util.price.toDecimalFormat +import com.sopt.withsuhyeon.ui.theme.WithSuhyeonTheme.colors +import com.sopt.withsuhyeon.ui.theme.WithSuhyeonTheme.typography + +@Composable +fun PostBottomBar( + price: Int, + isMyPost: Boolean, + isDisabled: Boolean = true, + modifier: Modifier = Modifier, + onClick: () -> Unit = {} +) { + val borderColor = colors.Grey100 + val buttonText = if(isMyPost) + stringResource(R.string.post_bottom_bar_in_progress_chating) + else + stringResource(R.string.post_bottom_bar_start_chating) + + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterHorizontally), + modifier = modifier + .fillMaxWidth() + .height(106.dp) + .drawBehind { + val borderThickness = 1.dp.toPx() + drawLine( + color = borderColor, + start = Offset(0f, 0f), + end = Offset(size.width, 0f), + strokeWidth = borderThickness + ) + } + .background( + color = colors.White, + ) + .padding( + top = 16.dp, + bottom = 34.dp, + start = 16.dp, + end = 16.dp + ) + ) { + Column( + ) { + Text( + text = stringResource(R.string.find_suhyeon_price), + style = typography.caption01_SB.merge(colors.Grey500) + ) + Text( + text = price.toDecimalFormat(), + style = typography.body02_B.merge(colors.Grey900) + ) + } + LargeButton( + text = buttonText, + isDisabled = if(isMyPost) false else isDisabled, + isDownloadBtn = false, + modifier = modifier.weight(1f), + font = typography.body01_B, + onClick = onClick + ) + } +} + +@Preview +@Composable +fun PreviewPostBottomBar() { + var isDisabled by remember { mutableStateOf(false) } + PostBottomBar( + price = 50000, + isMyPost = false, + isDisabled = isDisabled, + onClick = { + isDisabled = !isDisabled + } + ) +} \ No newline at end of file