Skip to content

Commit 6614b13

Browse files
committed
feature/#158: pull 받고 기존 코드와 오류 나는 부분 수정
2 parents 8cb7e98 + cb49bd3 commit 6614b13

File tree

300 files changed

+6081
-8926
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+6081
-8926
lines changed

app/src/main/java/com/paw/key/core/designsystem/component/CourseDetail.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import com.paw.key.R
4646
import com.paw.key.core.designsystem.theme.Gray100
4747
import com.paw.key.core.designsystem.theme.PawKeyTheme
4848
import com.paw.key.core.extension.noRippleClickable
49-
import com.paw.key.domain.model.entity.walklist.CategoryTop3Entity
49+
import com.paw.key.domain.entity.walklist.CategoryTop3Entity
5050

5151
@OptIn(ExperimentalLayoutApi::class)
5252
@Composable

app/src/main/java/com/paw/key/core/designsystem/component/DogkyFilterBadge.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ fun DogkyFilterBadge(
3939
)
4040
.clickable(
4141
onClick = onLocationClick
42-
),
42+
)
43+
.padding(horizontal = horizontalPadding.dp, vertical = verticalPadding.dp),
4344
contentAlignment = Alignment.Center
4445
) {
4546
Text(
4647
text = location,
4748
style = PawKeyTheme.typography.buttonSmall,
4849
color = PawKeyTheme.colors.primary,
49-
modifier = Modifier.padding(horizontal = horizontalPadding.dp, vertical = verticalPadding.dp)
5050
)
5151
}
5252
}
@@ -56,8 +56,10 @@ fun DogkyFilterBadge(
5656
private fun RegionBadgePreview() {
5757
PawKeyTheme {
5858
DogkyFilterBadge(
59-
location = "w적음",
60-
onLocationClick = {}
59+
location = "강남구 역삼동",
60+
onLocationClick = {},
61+
horizontalPadding = 6,
62+
verticalPadding = 5,
6163
)
6264
}
6365
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
package com.paw.key.core.designsystem.component
2+
3+
import androidx.compose.foundation.background
4+
import androidx.compose.foundation.border
5+
import androidx.compose.foundation.layout.Box
6+
import androidx.compose.foundation.layout.fillMaxWidth
7+
import androidx.compose.foundation.layout.padding
8+
import androidx.compose.foundation.shape.RoundedCornerShape
9+
import androidx.compose.material3.Text
10+
import androidx.compose.runtime.Composable
11+
import androidx.compose.ui.Alignment
12+
import androidx.compose.ui.Modifier
13+
import androidx.compose.ui.text.style.TextAlign
14+
import androidx.compose.ui.tooling.preview.Preview
15+
import androidx.compose.ui.unit.dp
16+
import com.paw.key.core.designsystem.theme.PawKeyTheme
17+
import com.paw.key.core.extension.noRippleClickable
18+
19+
@Composable
20+
fun DokiBorderButton(
21+
text: String,
22+
enabled: Boolean,
23+
onClick: () -> Unit,
24+
modifier: Modifier = Modifier,
25+
) {
26+
val textColor = when {
27+
enabled -> PawKeyTheme.colors.primary
28+
else -> PawKeyTheme.colors.defaultMiddle
29+
}
30+
31+
Box(
32+
modifier = modifier
33+
.fillMaxWidth()
34+
.border(
35+
width = 1.dp,
36+
color = textColor,
37+
shape = RoundedCornerShape(8.dp)
38+
)
39+
.background(
40+
color = PawKeyTheme.colors.background,
41+
shape = RoundedCornerShape(8.dp)
42+
)
43+
.noRippleClickable {
44+
if (enabled) onClick()
45+
}
46+
.padding(vertical = 18.dp),
47+
contentAlignment = Alignment.Center
48+
) {
49+
Text(
50+
text = text,
51+
style = PawKeyTheme.typography.mainButtonActive,
52+
color = textColor,
53+
modifier = Modifier.fillMaxWidth(),
54+
textAlign = TextAlign.Center
55+
)
56+
}
57+
}
58+
59+
@Preview
60+
@Composable
61+
private fun DokiBorderButtonPreview() {
62+
PawKeyTheme {
63+
DokiBorderButton(
64+
text = "산책 기록하기",
65+
enabled = true,
66+
onClick = {}
67+
)
68+
}
69+
}

app/src/main/java/com/paw/key/core/designsystem/component/DogkyButton.kt renamed to app/src/main/java/com/paw/key/core/designsystem/component/DokiButton.kt

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.paw.key.core.designsystem.component
22

33
import androidx.compose.foundation.background
44
import androidx.compose.foundation.layout.Box
5+
import androidx.compose.foundation.layout.PaddingValues
56
import androidx.compose.foundation.layout.fillMaxWidth
67
import androidx.compose.foundation.layout.padding
78
import androidx.compose.foundation.shape.RoundedCornerShape
@@ -15,11 +16,12 @@ import com.paw.key.core.designsystem.theme.PawKeyTheme
1516
import com.paw.key.core.extension.noRippleClickable
1617

1718
@Composable
18-
fun DogkyButton(
19+
fun DokiButton(
1920
text: String,
2021
enabled: Boolean,
2122
onClick: () -> Unit,
22-
modifier: Modifier = Modifier
23+
modifier: Modifier = Modifier,
24+
isDialog: Boolean = false,
2325
) {
2426
val backgroundColor = when {
2527
enabled -> PawKeyTheme.colors.primary
@@ -31,19 +33,29 @@ fun DogkyButton(
3133
else -> PawKeyTheme.colors.defaultMiddle
3234
}
3335

36+
val typo = when {
37+
isDialog -> PawKeyTheme.typography.subTitle
38+
enabled -> PawKeyTheme.typography.mainButtonActive
39+
else -> PawKeyTheme.typography.mainButtonDefault
40+
}
41+
3442
Box(
3543
modifier = modifier
3644
.fillMaxWidth()
3745
.background(backgroundColor, shape = RoundedCornerShape(8.dp))
38-
.noRippleClickable {
39-
if (enabled) onClick()
40-
}
41-
.padding(vertical = 14.dp),
46+
.noRippleClickable(onClick = onClick)
47+
.padding(
48+
if (isDialog) {
49+
PaddingValues(horizontal = 6.dp, vertical = 17.dp)
50+
} else {
51+
PaddingValues(vertical = 18.dp)
52+
}
53+
),
4254
contentAlignment = Alignment.Center
4355
) {
4456
Text(
4557
text = text,
46-
style = PawKeyTheme.typography.mainButtonDefault,
58+
style = typo,
4759
color = textColor
4860
)
4961
}
@@ -53,9 +65,9 @@ fun DogkyButton(
5365
@Composable
5466
private fun DogkyButtonPreview() {
5567
PawKeyTheme {
56-
DogkyButton(
57-
text = "",
58-
enabled = true,
68+
DokiButton(
69+
text = "산책 종료하기",
70+
enabled = false,
5971
onClick = {}
6072
)
6173
}

app/src/main/java/com/paw/key/core/designsystem/component/ImageModal.kt

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,17 @@
11
package com.paw.key.core.designsystem.component
22

3-
import androidx.compose.foundation.Image
4-
import androidx.compose.foundation.clickable
53
import androidx.compose.foundation.layout.Column
64
import androidx.compose.foundation.layout.fillMaxWidth
75
import androidx.compose.foundation.layout.padding
86
import androidx.compose.foundation.layout.size
97
import androidx.compose.foundation.layout.wrapContentSize
10-
import androidx.compose.material.icons.Icons
11-
import androidx.compose.material.icons.filled.Close
12-
import androidx.compose.material3.Icon
138
import androidx.compose.runtime.Composable
149
import androidx.compose.ui.Alignment
1510
import androidx.compose.ui.Modifier
16-
import androidx.compose.ui.graphics.Color
17-
import androidx.compose.ui.platform.LocalContext
18-
import androidx.compose.ui.res.painterResource
1911
import androidx.compose.ui.tooling.preview.Preview
2012
import androidx.compose.ui.unit.dp
21-
import coil.compose.AsyncImage
22-
2313
import androidx.compose.ui.window.Dialog
24-
import coil.request.ImageRequest
25-
import com.paw.key.R
14+
import coil.compose.AsyncImage
2615
import com.paw.key.core.designsystem.theme.PawKeyTheme
2716

2817
@Composable
@@ -67,4 +56,4 @@ fun ImageModalPreview() {
6756
onDismiss = {}
6857
)
6958
}
70-
}
59+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
package com.paw.key.core.designsystem.component
2+
3+
import androidx.compose.foundation.background
4+
import androidx.compose.foundation.layout.Box
5+
import androidx.compose.foundation.layout.padding
6+
import androidx.compose.foundation.shape.RoundedCornerShape
7+
import androidx.compose.material3.Text
8+
import androidx.compose.runtime.Composable
9+
import androidx.compose.ui.Modifier
10+
import androidx.compose.ui.tooling.preview.Preview
11+
import androidx.compose.ui.unit.dp
12+
import com.paw.key.core.designsystem.theme.PawKeyTheme
13+
14+
@Composable
15+
fun InfoChip(
16+
text: String,
17+
modifier: Modifier = Modifier,
18+
isActionChip: Boolean = false,
19+
) {
20+
val backGroundColor = if (isActionChip) {
21+
PawKeyTheme.colors.primary
22+
} else {
23+
PawKeyTheme.colors.primaryGra1
24+
}
25+
26+
val textColor = if (isActionChip) {
27+
PawKeyTheme.colors.background
28+
} else {
29+
PawKeyTheme.colors.primary
30+
}
31+
32+
val fontStyle = if (isActionChip) {
33+
PawKeyTheme.typography.bodySmall
34+
} else {
35+
PawKeyTheme.typography.subButtonDefault
36+
}
37+
38+
Box (
39+
modifier = modifier
40+
.background(
41+
color = backGroundColor,
42+
shape = RoundedCornerShape(8.dp)
43+
)
44+
.padding(horizontal = 8.dp, vertical = 4.dp)
45+
) {
46+
Text(
47+
text = text,
48+
color = textColor,
49+
style = fontStyle
50+
)
51+
}
52+
}
53+
54+
@Preview
55+
@Composable
56+
private fun InfoChipPreview() {
57+
PawKeyTheme {
58+
InfoChip(
59+
text = "2.2 km",
60+
isActionChip = true
61+
)
62+
}
63+
}

app/src/main/java/com/paw/key/core/designsystem/component/LoadingScreen.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package com.paw.key.core.designsystem.component
22

3+
import androidx.compose.foundation.background
34
import androidx.compose.foundation.layout.Box
45
import androidx.compose.foundation.layout.Column
56
import androidx.compose.foundation.layout.Spacer
67
import androidx.compose.foundation.layout.fillMaxSize
78
import androidx.compose.foundation.layout.height
89
import androidx.compose.material3.CircularProgressIndicator
9-
import androidx.compose.material3.Text
1010
import androidx.compose.runtime.Composable
1111
import androidx.compose.ui.Alignment
1212
import androidx.compose.ui.Modifier
@@ -17,19 +17,22 @@ import com.paw.key.core.designsystem.theme.PawKeyTheme
1717
@Composable
1818
fun LoadingScreen() {
1919
Box(
20-
modifier = Modifier.fillMaxSize(),
20+
modifier = Modifier
21+
.fillMaxSize()
22+
.background(
23+
color = PawKeyTheme.colors.contents.copy(alpha = 0.5f)
24+
),
2125
contentAlignment = Alignment.Center
2226
) {
2327
Column(
2428
horizontalAlignment = Alignment.CenterHorizontally
2529
) {
2630
CircularProgressIndicator(
27-
color = PawKeyTheme.colors.green500
31+
color = PawKeyTheme.colors.primary
2832
)
2933

3034
Spacer(modifier = Modifier.height(8.dp))
3135

32-
Text("현재 위치를 가져오는 중...")
3336
}
3437
}
3538
}

app/src/main/java/com/paw/key/core/designsystem/component/SubChip.kt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import com.paw.key.core.extension.noRippleClickable
1616
@Composable
1717
private fun PreviewSubChip() {
1818
SubChip(
19-
text = "4km",
19+
text = "+ 9",
2020
onClick = {}
2121
)
2222
}
@@ -26,21 +26,25 @@ fun SubChip(
2626
text: String,
2727
modifier: Modifier = Modifier,
2828
onClick : () -> Unit = {},
29+
isDividerChip: Boolean = false, //true -> detail의 16dp
2930
isActionChip: Boolean = false, //true -> 회색
3031
) {
3132
Box(
3233
modifier = modifier
3334
.background(
34-
color = if (isActionChip) PawKeyTheme.colors.white2 else PawKeyTheme.colors.green50,
35-
shape = RoundedCornerShape(20.dp)
35+
color = if (isActionChip) PawKeyTheme.colors.primaryGra1 else PawKeyTheme.colors.defaultButton,
36+
shape = if (isActionChip) RoundedCornerShape(8.dp) else RoundedCornerShape(36.dp)
3637
)
3738
.noRippleClickable(onClick = onClick)
38-
.padding(horizontal = 10.dp, vertical = 4.dp)
39+
.then(
40+
if (isDividerChip) Modifier.padding(horizontal = 16.dp, vertical = 4.dp)
41+
else Modifier.padding(8.dp)
42+
)
3943
) {
4044
Text(
4145
text = text,
42-
color = if (isActionChip) PawKeyTheme.colors.gray700 else PawKeyTheme.colors.green600,
43-
style = PawKeyTheme.typography.caption12R
46+
color = if (isActionChip) PawKeyTheme.colors.primary else PawKeyTheme.colors.defaultMiddle,
47+
style = if (isActionChip) PawKeyTheme.typography.subButtonActive else PawKeyTheme.typography.buttonSmall
4448
)
4549
}
4650
}

0 commit comments

Comments
 (0)