Skip to content

Commit

Permalink
Merge pull request #131 from pknu-wap/feature/tgyuu/#129
Browse files Browse the repository at this point in the history
Feature/tgyuu/#129
  • Loading branch information
tgyuuAn authored Feb 18, 2024
2 parents a1bf5fe + cfd6939 commit caa95ee
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 14 deletions.
9 changes: 9 additions & 0 deletions core/designresource/src/main/res/drawable/ic_return.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M20,12.135C19.999,14.22 19.277,16.219 17.994,17.693C16.711,19.168 14.971,19.997 13.156,20H0.834C0.613,20 0.401,19.899 0.244,19.72C0.088,19.54 0,19.296 0,19.043C0,18.789 0.088,18.545 0.244,18.366C0.401,18.186 0.613,18.085 0.834,18.085H13.156C14.521,18.071 15.827,17.438 16.788,16.325C17.749,15.211 18.288,13.706 18.288,12.138C18.288,10.57 17.749,9.065 16.788,7.951C15.827,6.837 14.521,6.205 13.156,6.191H3.16L5.888,8.766C5.974,8.846 6.044,8.944 6.096,9.055C6.148,9.166 6.18,9.288 6.191,9.413C6.202,9.539 6.192,9.665 6.16,9.786C6.128,9.907 6.076,10.019 6.006,10.116C5.936,10.214 5.85,10.295 5.753,10.354C5.657,10.413 5.55,10.45 5.441,10.462C5.332,10.474 5.222,10.461 5.117,10.424C5.012,10.386 4.914,10.326 4.83,10.245L0.304,5.972C0.294,5.963 0.287,5.951 0.277,5.941C0.255,5.919 0.235,5.895 0.215,5.869L0.209,5.862C0.203,5.855 0.195,5.849 0.19,5.841V5.838C0.181,5.826 0.175,5.812 0.167,5.8C0.15,5.775 0.135,5.749 0.121,5.722C0.118,5.716 0.113,5.71 0.11,5.703C0.108,5.697 0.1,5.687 0.096,5.679C0.093,5.67 0.088,5.653 0.083,5.641C0.071,5.613 0.061,5.584 0.053,5.555L0.05,5.547C0.032,5.492 0.02,5.435 0.013,5.378C0.011,5.36 0.006,5.343 0.005,5.326C0.003,5.308 0.005,5.292 0.005,5.275C0.005,5.258 0.001,5.248 0.001,5.233C0.001,5.219 0.004,5.205 0.005,5.191V5.141C0.005,5.124 0.011,5.106 0.013,5.088C0.02,5.03 0.032,4.974 0.05,4.919L0.053,4.911C0.062,4.881 0.071,4.853 0.083,4.825C0.088,4.813 0.09,4.799 0.096,4.787C0.102,4.775 0.106,4.771 0.11,4.763C0.115,4.754 0.118,4.75 0.121,4.744C0.135,4.717 0.15,4.691 0.166,4.666C0.174,4.653 0.18,4.64 0.189,4.628V4.625C0.197,4.613 0.208,4.605 0.216,4.594C0.236,4.57 0.255,4.546 0.276,4.525C0.286,4.515 0.293,4.503 0.303,4.494L0.308,4.489L4.831,0.22C4.916,0.14 5.013,0.079 5.118,0.042C5.223,0.005 5.334,-0.008 5.443,0.004C5.552,0.016 5.658,0.053 5.755,0.112C5.852,0.171 5.938,0.252 6.008,0.349C6.077,0.447 6.13,0.559 6.161,0.68C6.193,0.8 6.204,0.927 6.193,1.053C6.182,1.178 6.15,1.3 6.098,1.411C6.046,1.522 5.975,1.62 5.89,1.7L3.162,4.276H13.157C14.972,4.279 16.711,5.108 17.994,6.581C19.276,8.054 19.998,10.052 20,12.135Z"
android:fillColor="#ffffff"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ private fun EventsList(
LazyColumn(
contentPadding = PaddingValues(horizontal = 15.dp),
verticalArrangement = Arrangement.spacedBy(12.dp),
modifier = Modifier.fillMaxWidth(),
modifier = Modifier
.fillMaxWidth()
.padding(top = 12.dp),
) {
items(
items = events,
Expand All @@ -118,11 +120,11 @@ private fun EventsList(
) {
Image(
painter = painterResource(id = R.drawable.ic_cat),
contentDescription = stringResource(id = R.string.bottomSheetCatContentDescription),
contentDescription = stringResource(id = R.string.cat_content_description),
)

Text(
text = stringResource(id = R.string.bottomSheetNoEvent),
text = stringResource(id = R.string.bottomSheet_no_event),
style = WappTheme.typography.titleMedium,
color = WappTheme.colors.white,
textAlign = TextAlign.Center,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.wap.wapp.feature.notice

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
Expand Down Expand Up @@ -35,7 +38,9 @@ import com.wap.wapp.core.commmon.util.DateUtil.DAYS_IN_WEEK
import com.wap.wapp.core.commmon.util.DateUtil.DaysOfWeek
import com.wap.wapp.core.commmon.util.DateUtil.YEAR_MONTH_END_INDEX
import com.wap.wapp.core.commmon.util.DateUtil.YEAR_MONTH_START_INDEX
import com.wap.wapp.core.commmon.util.DateUtil.generateNowDate
import com.wap.wapp.core.commmon.util.DateUtil.yyyyMMddFormatter
import com.wap.wapp.core.designresource.R.drawable
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import java.time.DayOfWeek
Expand Down Expand Up @@ -104,7 +109,7 @@ private fun CalendarHeader(
Image(
painter = painterResource(id = R.drawable.ic_threelines),
contentDescription =
stringResource(R.string.calendarToggleImageContextDescription),
stringResource(R.string.calendar_content_description),
modifier = Modifier
.align(Alignment.CenterStart)
.clickable {
Expand All @@ -121,8 +126,8 @@ private fun CalendarHeader(
modifier = Modifier.align(Alignment.Center),
) {
Image(
painter = painterResource(id = com.wap.wapp.core.designresource.R.drawable.ic_back),
contentDescription = stringResource(id = R.string.backMonthArrowContentDescription),
painter = painterResource(id = drawable.ic_back),
contentDescription = stringResource(id = R.string.back_month_arrow_content_description),
modifier = Modifier
.padding(end = 20.dp)
.clickable {
Expand All @@ -141,8 +146,9 @@ private fun CalendarHeader(
)

Image(
painter = painterResource(id = com.wap.wapp.core.designresource.R.drawable.ic_forward),
contentDescription = stringResource(id = R.string.forwardMonthArrowContentDescription),
painter = painterResource(id = drawable.ic_forward),
contentDescription =
stringResource(id = R.string.forward_month_arrow_content_description),
modifier = Modifier
.padding(start = 20.dp)
.clickable {
Expand All @@ -151,6 +157,25 @@ private fun CalendarHeader(
},
)
}

AnimatedVisibility(
visible = selectedDate != generateNowDate(),
enter = fadeIn(),
exit = fadeOut(),
modifier = Modifier
.align(Alignment.CenterEnd)
.padding(end = 16.dp),
) {
Image(
painter = painterResource(id = drawable.ic_return),
contentDescription =
stringResource(R.string.return_today_content_description),
modifier = Modifier.clickable {
onDateSelected(generateNowDate())
onCalendarMonthChanged()
},
)
}
}

@Composable
Expand Down
13 changes: 7 additions & 6 deletions feature/notice/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<resources>
<string name="calendarToggleImageContextDescription">공지사항 목록만을 보여주거나, 캘린더를 다시 보여줍니다.</string>
<string name="calendarContentDescription">공지사항을 보여주는 달력입니다.</string>
<string name="bottomSheetCatContentDescription">일정이 없을 때 보여주는 작고 귀여운 고양이 입니다.</string>
<string name="bottomSheetNoEvent">일정이 없습니다.</string>
<string name="backMonthArrowContentDescription">"이전 달을 보여주는 화살표 입니다."</string>
<string name="forwardMonthArrowContentDescription">"다음 달을 보여주는 화살표 입니다."</string>
<string name="calendar_toggle_content_description">공지사항 목록만을 보여주거나, 캘린더를 다시 보여줍니다.</string>
<string name="calendar_content_description">공지사항을 보여주는 달력입니다.</string>
<string name="cat_content_description">일정이 없을 때 보여주는 작고 귀여운 고양이 입니다.</string>
<string name="bottomSheet_no_event">일정이 없습니다.</string>
<string name="back_month_arrow_content_description">"이전 달을 보여주는 버튼 입니다."</string>
<string name="forward_month_arrow_content_description">"다음 달을 보여주는 버튼 입니다."</string>
<string name="return_today_content_description">오늘 날짜로 이동하는 버튼 입니다.</string>
</resources>

0 comments on commit caa95ee

Please sign in to comment.