Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class CalendarSelectView : LinearLayout {
) {
setBackgroundResource(R.drawable.frame_day_today)
setTextColor(ContextCompat.getColor(context, R.color.gray_700))
typeface = ResourcesCompat.getFont(context, R.font.nanum_square_regular)
typeface = ResourcesCompat.getFont(context, R.font.nanum_square_bold)
} else {
setBackgroundColor(ContextCompat.getColor(context, R.color.transparent))
setTextColor(ContextCompat.getColor(context, R.color.gray_700))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.wafflestudio.siksha2.ui.NavigateUpIcon
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SikshaTypography
Expand All @@ -33,6 +34,7 @@ fun TopBar(
modifier = Modifier.align(Alignment.Center),
color = SikshaTheme.colors.TextGNB,
fontWeight = FontWeight.ExtraBold,
fontSize = 16.sp,
style = SikshaTypography.subtitle1
)
Box(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
Expand All @@ -15,7 +14,6 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
Expand Down Expand Up @@ -79,7 +77,7 @@ fun CommentReportScreen(
Column(
modifier = Modifier
.fillMaxSize()
.background(SikshaTheme.colors.White)
.background(SikshaTheme.colors.BackgroundPrimary)
) {
TopBar(
title = "신고하기",
Expand All @@ -104,7 +102,7 @@ fun CommentReportScreen(
text = "어떤 이유로 신고하시나요?",
style = TextStyle(
fontSize = 20.sp,
color = Color.Black
color = SikshaTheme.colors.Black
),
modifier = Modifier.padding(start = 4.dp)
)
Expand All @@ -125,7 +123,8 @@ fun CommentReportScreen(
text = user.nickname,
fontSize = 12.sp,
fontWeight = FontWeight.Bold,
maxLines = 1
maxLines = 1,
color = SikshaTheme.colors.Black
)
}

Expand All @@ -137,8 +136,7 @@ fun CommentReportScreen(
.padding(horizontal = 28.dp)
.height(280.dp)
.align(Alignment.CenterHorizontally)
.background(Color(0xFFF5F5F5), shape = RoundedCornerShape(8.dp))
.border(1.dp, Color.LightGray, shape = RoundedCornerShape(8.dp))
.background(SikshaTheme.colors.Gray50, shape = RoundedCornerShape(8.dp))
) {
BasicTextField(
value = reportContent,
Expand All @@ -147,7 +145,10 @@ fun CommentReportScreen(
reportContent = it
}
},
textStyle = TextStyle(fontSize = 16.sp),
textStyle = TextStyle(
fontSize = 16.sp,
color = SikshaTheme.colors.Black
),
modifier = Modifier
.fillMaxWidth()
.weight(1f)
Expand All @@ -156,7 +157,7 @@ fun CommentReportScreen(

Text(
text = "${reportContent.length}자/200자",
style = TextStyle(color = Color.Gray, fontSize = 12.sp),
style = TextStyle(color = SikshaTheme.colors.Gray700, fontSize = 12.sp),
modifier = Modifier
.align(Alignment.End)
.padding(8.dp)
Expand All @@ -169,7 +170,10 @@ fun CommentReportScreen(
onClick = {
onClickReport(reportContent)
},
colors = ButtonDefaults.buttonColors(backgroundColor = Color(0xFFFF9522)),
colors = ButtonDefaults.buttonColors(
backgroundColor = SikshaTheme.colors.Orange500,
disabledBackgroundColor = SikshaTheme.colors.Gray600
),
enabled = isContentNotEmpty,
modifier = Modifier
.fillMaxWidth()
Expand All @@ -179,7 +183,7 @@ fun CommentReportScreen(
) {
Text(
text = "전송하기",
color = Color.White,
color = SikshaTheme.colors.TextButton,
style = TextStyle(
fontSize = 17.sp
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,11 @@ fun ContentEditText(
value = value,
onValueChange = onValueChange,
modifier = modifier,
textStyle = SikshaTypography.body1.copy(color = SikshaTheme.colors.Black, fontSize = 14.sp),
textStyle = SikshaTypography.body1.copy(
color = SikshaTheme.colors.Black,
fontSize = 14.sp,
lineHeight = 21.sp
),
cursorBrush = SolidColor(SikshaTheme.colors.Orange500),
decorationBox = {
Box(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,13 @@ fun PostDetailScreenFailed(
}
)
Box(
modifier = Modifier.fillMaxSize(),
modifier = Modifier.fillMaxSize()
.background(colors.BackgroundPrimary),
contentAlignment = Alignment.Center
) {
Text(
text = errorMessage,
color = colors.Gray400,
color = colors.Gray600,
fontSize = 12.sp,
style = MaterialTheme.typography.body2
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.material.Button
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.Text
Expand All @@ -25,8 +25,10 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.paging.LoadState
import androidx.paging.PagingData
Expand Down Expand Up @@ -240,17 +242,18 @@ fun PostsErrorPlaceHolder(
color = SikshaTheme.colors.Gray600,
style = SikshaTypography.subtitle1
)
Button(
modifier = Modifier.background(SikshaTheme.colors.Orange500),
onClick = {
Text(
modifier = Modifier.background(
SikshaTheme.colors.Orange500,
RoundedCornerShape(8.dp)
).clickable {
onClickRetry()
}
) {
Text(
text = stringResource(R.string.community_retry_button),
color = SikshaTheme.colors.TextButton
)
}
}.padding(vertical = 10.dp, horizontal = 20.dp),
text = stringResource(R.string.community_retry_button),
color = SikshaTheme.colors.TextButton,
fontSize = 16.sp,
fontWeight = FontWeight.Bold
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
Expand All @@ -15,7 +14,6 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
Expand Down Expand Up @@ -79,7 +77,7 @@ fun PostReportScreen(
Column(
modifier = Modifier
.fillMaxSize()
.background(SikshaTheme.colors.White)
.background(SikshaTheme.colors.BackgroundPrimary)
) {
TopBar(
title = "신고하기",
Expand All @@ -104,7 +102,7 @@ fun PostReportScreen(
text = "어떤 이유로 신고하시나요?",
style = TextStyle(
fontSize = 20.sp,
color = Color.Black
color = SikshaTheme.colors.Black
),
modifier = Modifier.padding(start = 4.dp)
)
Expand All @@ -125,7 +123,8 @@ fun PostReportScreen(
text = user.nickname,
fontSize = 12.sp,
fontWeight = FontWeight.Bold,
maxLines = 1
maxLines = 1,
color = SikshaTheme.colors.Black
)
}

Expand All @@ -137,8 +136,7 @@ fun PostReportScreen(
.padding(horizontal = 28.dp)
.height(280.dp)
.align(Alignment.CenterHorizontally)
.background(Color(0xFFF5F5F5), shape = RoundedCornerShape(8.dp))
.border(1.dp, Color.LightGray, shape = RoundedCornerShape(8.dp))
.background(SikshaTheme.colors.Gray50, shape = RoundedCornerShape(8.dp))
) {
BasicTextField(
value = reportContent,
Expand All @@ -147,7 +145,10 @@ fun PostReportScreen(
reportContent = it
}
},
textStyle = TextStyle(fontSize = 16.sp),
textStyle = TextStyle(
fontSize = 16.sp,
color = SikshaTheme.colors.Black
),
modifier = Modifier
.fillMaxWidth()
.weight(1f)
Expand All @@ -156,7 +157,7 @@ fun PostReportScreen(

Text(
text = "${reportContent.length}자/200자",
style = TextStyle(color = Color.Gray, fontSize = 12.sp),
style = TextStyle(color = SikshaTheme.colors.Gray700, fontSize = 12.sp),
modifier = Modifier
.align(Alignment.End)
.padding(8.dp)
Expand All @@ -169,7 +170,10 @@ fun PostReportScreen(
onClick = {
onClickReport(reportContent)
},
colors = ButtonDefaults.buttonColors(backgroundColor = Color(0xFFFF9522)),
colors = ButtonDefaults.buttonColors(
backgroundColor = SikshaTheme.colors.Orange500,
disabledBackgroundColor = SikshaTheme.colors.Gray600
),
enabled = isContentNotEmpty,
modifier = Modifier
.fillMaxWidth()
Expand All @@ -179,7 +183,7 @@ fun PostReportScreen(
) {
Text(
text = "전송하기",
color = Color.White,
color = SikshaTheme.colors.TextButton,
style = TextStyle(
fontSize = 17.sp
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fun UserPostListScreen(

Column(
modifier = modifier
.background(SikshaTheme.colors.White)
.background(SikshaTheme.colors.BackgroundPrimary)
) {
TopBar(
title = "내가 쓴 글",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Divider
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.livedata.observeAsState
import androidx.compose.runtime.mutableFloatStateOf
Expand Down Expand Up @@ -103,14 +105,25 @@ fun MenuGroupList(
val toolbarHeight = 60.dp
val toolbarHeightPx = with(LocalDensity.current) { toolbarHeight.toPx() }
val toolbarOffsetHeightPx = remember { mutableFloatStateOf(0f) }
val listState = rememberLazyListState()
val isScrollable by remember {
derivedStateOf {
val layoutInfo = listState.layoutInfo
layoutInfo.totalItemsCount > 0 &&
(
layoutInfo.visibleItemsInfo.firstOrNull()?.index != 0 ||
layoutInfo.visibleItemsInfo.lastOrNull()?.index != layoutInfo.totalItemsCount - 1
)
}
}

val nestedScrollConnection = remember {
object : NestedScrollConnection {
override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
val delta = available.y
val newOffset = (toolbarOffsetHeightPx.floatValue + delta)
.coerceIn(-toolbarHeightPx, 0f)
toolbarOffsetHeightPx.floatValue = newOffset
toolbarOffsetHeightPx.floatValue = if (isScrollable) newOffset else 0f
return Offset.Zero
}
}
Expand All @@ -129,9 +142,10 @@ fun MenuGroupList(
) {
if (menuGroupList.isNotEmpty()) {
LazyColumn(
state = listState,
contentPadding = PaddingValues(top = toolbarHeight),
modifier = Modifier.fillMaxSize()
.padding(start = 8.dp, end = 8.dp, bottom = 17.dp),
.padding(start = 8.dp, end = 8.dp),
verticalArrangement = Arrangement.spacedBy(18.dp)
) {
items(menuGroupList) { menuGroup ->
Expand Down Expand Up @@ -161,6 +175,9 @@ fun MenuGroupList(
)
}
}
item {
Spacer(Modifier.height(17.dp))
}
}
} else {
Text(
Expand Down
Loading
Loading