From c8eafbe32291369796e5f14b0162b82719168638 Mon Sep 17 00:00:00 2001 From: arinming Date: Sat, 13 Jul 2024 04:54:57 +0900 Subject: [PATCH] =?UTF-8?q?[REFACTOR/#42]=20=EB=A6=AC=EB=B7=B0=20=EA=B8=B0?= =?UTF-8?q?=EB=B0=98=20=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/dialog/ScrapDialogContent.kt | 8 ++++---- .../java/com/terning/feature/intern/InternRoute.kt | 12 +++++++----- .../feature/intern/component/InternBottomBar.kt | 6 +++++- .../feature/intern/component/InternCompanyInfo.kt | 6 ++++-- .../feature/intern/navigation/InternNavigation.kt | 4 ++-- .../main/java/com/terning/feature/main/MainTab.kt | 1 - feature/src/main/res/values/strings.xml | 1 + 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/core/src/main/java/com/terning/core/designsystem/component/dialog/ScrapDialogContent.kt b/core/src/main/java/com/terning/core/designsystem/component/dialog/ScrapDialogContent.kt index 222b11220..aa6126363 100644 --- a/core/src/main/java/com/terning/core/designsystem/component/dialog/ScrapDialogContent.kt +++ b/core/src/main/java/com/terning/core/designsystem/component/dialog/ScrapDialogContent.kt @@ -7,10 +7,10 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.HorizontalDivider @@ -96,8 +96,8 @@ fun ScrapDialogContent( ) { Row( modifier = Modifier - .width(60.dp) - .height(60.dp) + .aspectRatio(1f) + .size(60.dp) .border( width = 1.dp, color = TerningMain, diff --git a/feature/src/main/java/com/terning/feature/intern/InternRoute.kt b/feature/src/main/java/com/terning/feature/intern/InternRoute.kt index 95f746903..683a71389 100644 --- a/feature/src/main/java/com/terning/feature/intern/InternRoute.kt +++ b/feature/src/main/java/com/terning/feature/intern/InternRoute.kt @@ -91,8 +91,6 @@ fun InternScreen( .padding(paddingValues) ) { item { - val decimal = DecimalFormat("#,###") - Column( modifier = modifier.padding( top = 24.dp, @@ -171,14 +169,16 @@ fun InternScreen( color = Grey400 ) Text( - text = "${decimal.format(100000)}회", + text = stringResource( + id = R.string.intern_view_count_detail, + DecimalFormat(DECIMAL_FORMAT) + ), style = TerningTheme.typography.button3, color = Grey400, ) } } - Column( verticalArrangement = Arrangement.Top, ) { @@ -318,4 +318,6 @@ fun InternScreen( } } } -} \ No newline at end of file +} + +const val DECIMAL_FORMAT = "#,###" \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt b/feature/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt index 0176386c1..c3ca6337f 100644 --- a/feature/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt +++ b/feature/src/main/java/com/terning/feature/intern/component/InternBottomBar.kt @@ -16,6 +16,7 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.terning.core.designsystem.component.button.RoundButton import com.terning.core.designsystem.theme.Grey150 @@ -77,7 +78,10 @@ fun InternBottomBar( tint = if (isScrap) TerningMain else Grey350 ) Text( - text = "${viewCount}회", + text = stringResource( + id = R.string.intern_view_count_detail, + viewCount + ), style = TerningTheme.typography.detail3, color = Grey400 ) diff --git a/feature/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt b/feature/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt index 184968732..34f3b8830 100644 --- a/feature/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt +++ b/feature/src/main/java/com/terning/feature/intern/component/InternCompanyInfo.kt @@ -5,9 +5,11 @@ import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.aspectRatio 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.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Text @@ -43,8 +45,8 @@ fun InternCompanyInfo(modifier: Modifier) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier - .width(60.dp) - .height(60.dp) + .aspectRatio(1f) + .size(60.dp) .border( width = 1.dp, color = TerningMain, diff --git a/feature/src/main/java/com/terning/feature/intern/navigation/InternNavigation.kt b/feature/src/main/java/com/terning/feature/intern/navigation/InternNavigation.kt index 51b52ae1b..040e17a61 100644 --- a/feature/src/main/java/com/terning/feature/intern/navigation/InternNavigation.kt +++ b/feature/src/main/java/com/terning/feature/intern/navigation/InternNavigation.kt @@ -5,7 +5,7 @@ import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController import androidx.navigation.NavOptions import androidx.navigation.compose.composable -import com.terning.core.navigation.MainTabRoute +import com.terning.core.navigation.Route import com.terning.feature.intern.InternRoute import kotlinx.serialization.Serializable @@ -27,4 +27,4 @@ fun NavGraphBuilder.internNavGraph( } @Serializable -data object Intern : MainTabRoute \ No newline at end of file +data object Intern : Route \ No newline at end of file diff --git a/feature/src/main/java/com/terning/feature/main/MainTab.kt b/feature/src/main/java/com/terning/feature/main/MainTab.kt index b7b826e31..3d35d1ac4 100644 --- a/feature/src/main/java/com/terning/feature/main/MainTab.kt +++ b/feature/src/main/java/com/terning/feature/main/MainTab.kt @@ -47,6 +47,5 @@ enum class MainTab( fun contains(predicate: @Composable (Route) -> Boolean): Boolean { return entries.map { it.route }.any { predicate(it) } } - } } diff --git a/feature/src/main/res/values/strings.xml b/feature/src/main/res/values/strings.xml index 5c504ef89..38941fb57 100644 --- a/feature/src/main/res/values/strings.xml +++ b/feature/src/main/res/values/strings.xml @@ -94,6 +94,7 @@ 지원 사이트로 이동하기 공고 정보 조회수 + %d회 서류 마감 근무 기간 근무 시작