Skip to content

Commit ec3c8ba

Browse files
committed
Refactor: 설정 화면 리디자인 반영
1 parent e9bdb65 commit ec3c8ba

File tree

2 files changed

+17
-27
lines changed

2 files changed

+17
-27
lines changed

presentation/src/main/java/com/threegap/bitnagil/presentation/setting/SettingScreen.kt

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.threegap.bitnagil.presentation.setting
22

33
import androidx.compose.foundation.background
4-
import androidx.compose.foundation.clickable
54
import androidx.compose.foundation.layout.Arrangement
65
import androidx.compose.foundation.layout.Column
76
import androidx.compose.foundation.layout.Row
@@ -27,6 +26,7 @@ import androidx.hilt.navigation.compose.hiltViewModel
2726
import com.threegap.bitnagil.designsystem.BitnagilTheme
2827
import com.threegap.bitnagil.designsystem.component.block.BitnagilOptionButton
2928
import com.threegap.bitnagil.designsystem.component.block.BitnagilTopBar
29+
import com.threegap.bitnagil.designsystem.modifier.clickableWithoutRipple
3030
import com.threegap.bitnagil.presentation.common.flow.collectAsEffect
3131
import com.threegap.bitnagil.presentation.setting.component.atom.settingtitle.SettingTitle
3232
import com.threegap.bitnagil.presentation.setting.component.block.ConfirmDialog
@@ -116,38 +116,28 @@ private fun SettingScreen(
116116
Text(
117117
text = "버전 ",
118118
color = BitnagilTheme.colors.black,
119-
style = BitnagilTheme.typography.body1Regular,
119+
style = BitnagilTheme.typography.body1Medium,
120120
)
121121
Text(
122122
text = state.version,
123123
color = BitnagilTheme.colors.black,
124124
style = BitnagilTheme.typography.body1SemiBold,
125125
)
126126
}
127-
if (state.version == state.latestVersion) {
128-
Text(
129-
"최신",
130-
modifier = Modifier
131-
.background(
132-
color = BitnagilTheme.colors.coolGray98,
133-
shape = RoundedCornerShape(4.dp),
134-
)
135-
.padding(horizontal = 10.dp, vertical = 5.dp),
136-
style = BitnagilTheme.typography.button2.copy(color = BitnagilTheme.colors.coolGray70),
137-
)
138-
} else {
139-
Text(
140-
"업데이트",
141-
modifier = Modifier
142-
.background(
143-
color = BitnagilTheme.colors.lightBlue200,
144-
shape = RoundedCornerShape(4.dp),
145-
)
146-
.clickable(onClick = onClickUpdate)
147-
.padding(horizontal = 10.dp, vertical = 5.dp),
148-
style = BitnagilTheme.typography.button2.copy(color = BitnagilTheme.colors.navy500),
149-
)
150-
}
127+
128+
val isLatest = state.version == state.latestVersion
129+
Text(
130+
text = if (isLatest) "최신" else "업데이트",
131+
color = if (isLatest) BitnagilTheme.colors.coolGray70 else BitnagilTheme.colors.orange500,
132+
style = BitnagilTheme.typography.button2,
133+
modifier = Modifier
134+
.background(
135+
color = if (isLatest) BitnagilTheme.colors.coolGray98 else BitnagilTheme.colors.orange50,
136+
shape = RoundedCornerShape(8.dp),
137+
)
138+
.let { if (!isLatest) it.clickableWithoutRipple(onClick = onClickUpdate) else it }
139+
.padding(horizontal = 10.dp, vertical = 5.dp),
140+
)
151141
}
152142

153143
BitnagilOptionButton(

presentation/src/main/java/com/threegap/bitnagil/presentation/setting/component/atom/settingtitle/SettingTitle.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ fun SettingTitle(
1515
Text(
1616
title,
1717
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp, vertical = 3.dp),
18-
style = BitnagilTheme.typography.caption1SemiBold.copy(color = BitnagilTheme.colors.coolGray50),
18+
style = BitnagilTheme.typography.caption1SemiBold.copy(color = BitnagilTheme.colors.coolGray60),
1919
)
2020
}

0 commit comments

Comments
 (0)