Skip to content

Commit 1c4196c

Browse files
authored
Merge pull request #66 from YAPP-Github/BOOK-156-feature/#62
feat: 독서 기록 플로우 화면 구성(OCR 문장 스캔이전까지)
2 parents 5640208 + 6fc9aff commit 1c4196c

File tree

37 files changed

+713
-37
lines changed

37 files changed

+713
-37
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ dependencies {
5151
projects.feature.library,
5252
projects.feature.login,
5353
projects.feature.main,
54+
projects.feature.record,
5455
projects.feature.screens,
5556
projects.feature.search,
5657
projects.feature.settings,

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
android:fullBackupContent="@xml/backup_rules"
1212
android:icon="@mipmap/ic_launcher"
1313
android:label="@string/app_name"
14+
android:networkSecurityConfig="@xml/network_security_config"
1415
android:roundIcon="@mipmap/ic_launcher_round"
1516
android:supportsRtl="true"
1617
android:theme="@style/Theme.Booket"
17-
tools:targetApi="31"
18-
android:networkSecurityConfig="@xml/network_security_config">
18+
tools:targetApi="31">
1919

2020
<provider
2121
android:name="androidx.startup.InitializationProvider"

core/designsystem/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dependencies {
1313
implementations(
1414
projects.core.common,
1515

16-
libs.compose.keyboard.state,
1716
libs.coil.compose,
1817
libs.logger,
1918

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.ninecraft.booket.core.designsystem
2+
3+
enum class RecordStep {
4+
REGISTER,
5+
APPRECIATION,
6+
EMOTION,
7+
;
8+
9+
val value: Int get() = ordinal
10+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.ninecraft.booket.core.designsystem.component
2+
3+
import androidx.compose.foundation.background
4+
import androidx.compose.foundation.layout.Arrangement
5+
import androidx.compose.foundation.layout.Box
6+
import androidx.compose.foundation.layout.Row
7+
import androidx.compose.foundation.layout.fillMaxWidth
8+
import androidx.compose.foundation.layout.height
9+
import androidx.compose.foundation.shape.RoundedCornerShape
10+
import androidx.compose.runtime.Composable
11+
import androidx.compose.ui.Modifier
12+
import androidx.compose.ui.draw.clip
13+
import androidx.compose.ui.unit.dp
14+
import com.ninecraft.booket.core.designsystem.RecordStep
15+
import com.ninecraft.booket.core.designsystem.theme.ReedTheme
16+
17+
@Composable
18+
fun RecordProgressBar(
19+
currentStep: RecordStep,
20+
modifier: Modifier = Modifier,
21+
) {
22+
Row(
23+
modifier = modifier.fillMaxWidth(),
24+
horizontalArrangement = Arrangement.spacedBy(ReedTheme.spacing.spacing1),
25+
) {
26+
repeat(3) { index ->
27+
Box(
28+
modifier = Modifier
29+
.weight(1f)
30+
.height(6.dp)
31+
.clip(RoundedCornerShape(ReedTheme.radius.full))
32+
.background(
33+
color = if (currentStep.value == index) {
34+
ReedTheme.colors.bgPrimary
35+
} else {
36+
ReedTheme.colors.bgDisabled
37+
},
38+
),
39+
)
40+
}
41+
}
42+
}

core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/divider/ReedDivider.kt renamed to core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/ReedDivider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.ninecraft.booket.core.designsystem.component.divider
1+
package com.ninecraft.booket.core.designsystem.component
22

33
import androidx.compose.foundation.background
44
import androidx.compose.foundation.layout.Box

core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/ButtonColorStyle.kt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
package com.ninecraft.booket.core.designsystem.component.button
22

3+
import androidx.compose.foundation.BorderStroke
34
import androidx.compose.runtime.Composable
5+
import androidx.compose.ui.unit.dp
46
import com.ninecraft.booket.core.designsystem.theme.Kakao
57
import com.ninecraft.booket.core.designsystem.theme.ReedTheme
68

79
enum class ReedButtonColorStyle {
8-
PRIMARY, SECONDARY, TERTIARY, KAKAO;
10+
PRIMARY, SECONDARY, TERTIARY, STROKE, KAKAO;
911

1012
@Composable
1113
fun containerColor(isPressed: Boolean) = when (this) {
1214
PRIMARY -> if (isPressed) ReedTheme.colors.bgPrimaryPressed else ReedTheme.colors.bgPrimary
1315
SECONDARY -> if (isPressed) ReedTheme.colors.bgSecondaryPressed else ReedTheme.colors.bgSecondary
1416
TERTIARY -> if (isPressed) ReedTheme.colors.bgTertiaryPressed else ReedTheme.colors.bgTertiary
17+
STROKE -> if (isPressed) ReedTheme.colors.basePrimary else ReedTheme.colors.basePrimary
1518
KAKAO -> Kakao
1619
}
1720

@@ -20,6 +23,7 @@ enum class ReedButtonColorStyle {
2023
PRIMARY -> ReedTheme.colors.contentInverse
2124
SECONDARY -> ReedTheme.colors.contentPrimary
2225
TERTIARY -> ReedTheme.colors.contentBrand
26+
STROKE -> ReedTheme.colors.contentBrand
2327
KAKAO -> ReedTheme.colors.contentPrimary
2428
}
2529

@@ -28,4 +32,10 @@ enum class ReedButtonColorStyle {
2832

2933
@Composable
3034
fun disabledContentColor() = ReedTheme.colors.contentDisabled
35+
36+
@Composable
37+
fun borderStroke() = when (this) {
38+
STROKE -> BorderStroke(1.dp, ReedTheme.colors.borderBrand)
39+
else -> null
40+
}
3141
}

0 commit comments

Comments
 (0)