Skip to content

Commit

Permalink
템플릿 공개여부 버튼 숨김
Browse files Browse the repository at this point in the history
  • Loading branch information
leesa-l committed Dec 29, 2023
1 parent c420f0f commit d52c7b0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,28 +207,29 @@ private fun ChecklistAvailable(
text = "체크리스트 템플릿",
style = ChevitTheme.typhography.headlineMedium.copy(color = ChevitTheme.colors.textPrimary),
)
if (checklistState.categories.isNotEmpty()) {
Text(
text = "공개",
style = ChevitTheme.typhography.bodyMedium.copy(color = ChevitTheme.colors.textSecondary),
)
Spacer(modifier = Modifier.width(6.dp))
Switch(
modifier = Modifier.size(width = 48.dp, height = 24.dp),
checked = checklistState.isTemplateOpen,
onCheckedChange = {
onCheckedChange(it)
},
colors = SwitchDefaults.colors(
checkedThumbColor = ChevitTheme.colors.white,
checkedTrackColor = ChevitTheme.colors.blue7,
checkedBorderColor = Color.Unspecified,
uncheckedThumbColor = ChevitTheme.colors.white,
uncheckedTrackColor = ChevitTheme.colors.grey2,
uncheckedBorderColor = Color.Unspecified,
),
)
}
//템플릿 공개여부 오픈스펙 제외
// if (checklistState.categories.isNotEmpty()) {
// Text(
// text = "공개",
// style = ChevitTheme.typhography.bodyMedium.copy(color = ChevitTheme.colors.textSecondary),
// )
// Spacer(modifier = Modifier.width(6.dp))
// Switch(
// modifier = Modifier.size(width = 48.dp, height = 24.dp),
// checked = checklistState.isTemplateOpen,
// onCheckedChange = {
// onCheckedChange(it)
// },
// colors = SwitchDefaults.colors(
// checkedThumbColor = ChevitTheme.colors.white,
// checkedTrackColor = ChevitTheme.colors.blue7,
// checkedBorderColor = Color.Unspecified,
// uncheckedThumbColor = ChevitTheme.colors.white,
// uncheckedTrackColor = ChevitTheme.colors.grey2,
// uncheckedBorderColor = Color.Unspecified,
// ),
// )
// }
}
Spacer(modifier = Modifier.height(24.dp))
if (checklistState.categories.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,33 @@ fun TemplateDetailScreen(
text = "체크리스트 템플릿",
style = ChevitTheme.typhography.headlineMedium.copy(color = ChevitTheme.colors.textPrimary),
)
if (detailState.categories.isNotEmpty()) {
Text(
text = "공개",
style = ChevitTheme.typhography.bodyMedium.copy(color = ChevitTheme.colors.textSecondary),
)
Spacer(modifier = Modifier.width(6.dp))
Switch(
modifier = Modifier.size(width = 48.dp, height = 24.dp),
checked = detailState.isTemplateOpen,
onCheckedChange = {
viewModel.dispatch(
TemplateDetailIntent.ChangeTemplateOpenSetting(
it
)
)
},
colors = SwitchDefaults.colors(
checkedThumbColor = ChevitTheme.colors.white,
checkedTrackColor = ChevitTheme.colors.blue7,
checkedBorderColor = Color.Unspecified,
uncheckedThumbColor = ChevitTheme.colors.white,
uncheckedTrackColor = ChevitTheme.colors.grey2,
uncheckedBorderColor = Color.Unspecified,
),
)
}
//템플릿 공개여부 오픈스펙 제외
// if (detailState.categories.isNotEmpty()) {
// Text(
// text = "공개",
// style = ChevitTheme.typhography.bodyMedium.copy(color = ChevitTheme.colors.textSecondary),
// )
// Spacer(modifier = Modifier.width(6.dp))
// Switch(
// modifier = Modifier.size(width = 48.dp, height = 24.dp),
// checked = detailState.isTemplateOpen,
// onCheckedChange = {
// viewModel.dispatch(
// TemplateDetailIntent.ChangeTemplateOpenSetting(
// it
// )
// )
// },
// colors = SwitchDefaults.colors(
// checkedThumbColor = ChevitTheme.colors.white,
// checkedTrackColor = ChevitTheme.colors.blue7,
// checkedBorderColor = Color.Unspecified,
// uncheckedThumbColor = ChevitTheme.colors.white,
// uncheckedTrackColor = ChevitTheme.colors.grey2,
// uncheckedBorderColor = Color.Unspecified,
// ),
// )
// }
}
Spacer(modifier = Modifier.height(20.dp))
if (detailState.categories.isEmpty()) {
Expand Down

0 comments on commit d52c7b0

Please sign in to comment.