-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
320 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...home/src/main/java/com/dkin/chevit/presentation/home/contents/component/EmptyChecklist.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.dkin.chevit.presentation.home.contents.component | ||
|
||
import androidx.compose.foundation.Image | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.text.style.TextAlign | ||
import androidx.compose.ui.unit.dp | ||
import com.dkin.chevit.presentation.resource.ChevitTheme | ||
import com.dkin.chevit.presentation.resource.R | ||
|
||
@Composable | ||
fun EmptyChecklist(modifier: Modifier) { | ||
Box(modifier = modifier.fillMaxSize(), contentAlignment = Alignment.Center) { | ||
Column( | ||
modifier = modifier.fillMaxWidth() | ||
) { | ||
Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) { | ||
Image( | ||
modifier = Modifier | ||
.align(Alignment.Center) | ||
.size(130.dp), | ||
painter = painterResource(id = R.drawable.ic_empty_checklist), | ||
contentDescription = "", | ||
) | ||
} | ||
Spacer(modifier = Modifier.height(12.dp)) | ||
Text( | ||
modifier = Modifier.fillMaxWidth(), | ||
text = "생성된 체크리스트가 없어요\n여행 일정을 추가해서 만들어 보아요!", | ||
style = ChevitTheme.typhography.bodyLarge.copy( | ||
color = ChevitTheme.colors.textSecondary, | ||
), | ||
textAlign = TextAlign.Center, | ||
) | ||
} | ||
} | ||
} |
89 changes: 89 additions & 0 deletions
89
...ome/src/main/java/com/dkin/chevit/presentation/home/contents/component/MyChecklistItem.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package com.dkin.chevit.presentation.home.contents.component | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.border | ||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.heightIn | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.layout.ContentScale | ||
import androidx.compose.ui.platform.LocalContext | ||
import androidx.compose.ui.unit.dp | ||
import coil.compose.AsyncImage | ||
import coil.request.ImageRequest | ||
import com.dkin.chevit.presentation.home.HomeState | ||
import com.dkin.chevit.presentation.resource.ChevitTheme | ||
|
||
@Composable | ||
fun MyChecklistItem( | ||
item: HomeState.CheckListItem, | ||
onClickItem: (id: String) -> Unit, | ||
modifier: Modifier = Modifier, | ||
) { | ||
Box(modifier = Modifier | ||
.fillMaxWidth() | ||
.clip(RoundedCornerShape(12.dp)) | ||
.background(color = ChevitTheme.colors.grey4) | ||
.clickable { onClickItem(item.id) } | ||
) { | ||
AsyncImage( | ||
modifier = Modifier.fillMaxWidth(), | ||
model = ImageRequest.Builder(LocalContext.current) | ||
.data(item.backgroundUrl) | ||
.crossfade(true) | ||
.build(), | ||
contentDescription = "", | ||
contentScale = ContentScale.FillWidth | ||
) | ||
Column( | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.padding(vertical = 12.5.dp, horizontal = 14.5.dp), | ||
) { | ||
Box( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.heightIn(min = 26.dp), | ||
contentAlignment = Alignment.CenterEnd, | ||
) { | ||
if (item.isProgress) { | ||
Box( | ||
modifier = Modifier | ||
.background( | ||
color = ChevitTheme.colors.grey10, | ||
shape = RoundedCornerShape(100.dp), | ||
) | ||
.border( | ||
width = 1.dp, | ||
color = ChevitTheme.colors.grey4, | ||
shape = RoundedCornerShape(100.dp), | ||
) | ||
.padding(horizontal = 14.dp, vertical = 4.dp), | ||
contentAlignment = Alignment.Center, | ||
) { | ||
Text( | ||
text = "진행중", | ||
style = ChevitTheme.typhography.bodySmall.copy(color = ChevitTheme.colors.white), | ||
) | ||
} | ||
} | ||
} | ||
Text( | ||
text = item.title, | ||
style = ChevitTheme.typhography.headlineSmall.copy(color = ChevitTheme.colors.white), | ||
) | ||
Text( | ||
text = item.date, | ||
style = ChevitTheme.typhography.bodySmall.copy(color = ChevitTheme.colors.white), | ||
) | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...tion/home/contents/TemplateTabContents.kt → .../contents/template/TemplateTabContents.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.