Skip to content
Closed
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 @@ -420,22 +420,21 @@ private fun Day(
style = Title5,
)
}
if (festivalCount > 0) {
val festivalDotColor = when (festivalCount) {
1 -> if (isSystemInDarkTheme()) DarkBlueGreen else LightBlueGreen
2 -> if (isSystemInDarkTheme()) DarkOrange else LightOrange
else -> if (isSystemInDarkTheme()) DarkRed else LightRed
}
Box(
modifier = Modifier
.size(9.dp)
.clip(CircleShape)
.background(festivalDotColor)
.align(Alignment.CenterHorizontally)
.padding(bottom = 24.dp),
)
Spacer(modifier = Modifier.height(12.dp))
val festivalDotColor = when (festivalCount) {
0 -> Color.Transparent
1 -> if (isSystemInDarkTheme()) DarkBlueGreen else LightBlueGreen
2 -> if (isSystemInDarkTheme()) DarkOrange else LightOrange
else -> if (isSystemInDarkTheme()) DarkRed else LightRed
}
Box(
modifier = Modifier
.size(9.dp)
.clip(CircleShape)
.background(festivalDotColor)
.align(Alignment.CenterHorizontally)
.padding(bottom = 24.dp),
)
Spacer(modifier = Modifier.height(12.dp))
}
}

Expand Down
5 changes: 5 additions & 0 deletions feature/menu/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ android {
"UNIFEST_WEB_URL",
properties["UNIFEST_WEB_URL"] as String,
)
buildConfigField(
"String",
"WHO_ARE_U_INFER_FORM_URL",
properties["WHO_ARE_U_INFER_FORM_URL"] as String,
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ internal fun MenuRoute(
is MenuUiEvent.NavigateToBoothDetail -> navigateToBoothDetail(event.boothId)
is MenuUiEvent.NavigateToContact -> uriHandler.openUri(BuildConfig.UNIFEST_CONTACT_URL)
is MenuUiEvent.NavigateToAdministratorMode -> uriHandler.openUri(BuildConfig.UNIFEST_WEB_URL)
is MenuUiEvent.NavigateToWhoAreUForm -> uriHandler.openUri(BuildConfig.WHO_ARE_U_INFER_FORM_URL)
is MenuUiEvent.ShowSnackBar -> onShowSnackBar(event.message)
is MenuUiEvent.ShowToast -> Toast.makeText(context, event.message.asString(context), Toast.LENGTH_SHORT).show()
}
Expand Down Expand Up @@ -370,6 +371,21 @@ internal fun MenuContent(
color = MaterialTheme.colorScheme.outline,
)
}
item {
MenuItem(
icon = ImageVector.vectorResource(R.drawable.ic_google_form),
title = stringResource(id = R.string.who_are_u_infer),
onClick = {
onMenuUiAction(MenuUiAction.OnWhoAreUInferClick)
},
)
}
item {
HorizontalDivider(
thickness = 1.dp,
color = MaterialTheme.colorScheme.outline,
)
}
item {
Box(
contentAlignment = Alignment.Center,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ sealed interface MenuUiAction {
data class OnToggleBookmark(val booth: LikedBoothModel) : MenuUiAction
data object OnContactClick : MenuUiAction
data object OnAdministratorModeClick : MenuUiAction
data object OnWhoAreUInferClick : MenuUiAction
data class OnRetryClick(val error: ErrorType) : MenuUiAction
data class OnToggleClustering(val isChecked: Boolean) : MenuUiAction
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ sealed interface MenuUiEvent {
data class NavigateToBoothDetail(val boothId: Long) : MenuUiEvent
data object NavigateToContact : MenuUiEvent
data object NavigateToAdministratorMode : MenuUiEvent
data object NavigateToWhoAreUForm : MenuUiEvent
data class ShowSnackBar(val message: UiText) : MenuUiEvent
data class ShowToast(val message: UiText) : MenuUiEvent
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,18 @@ class MenuViewModel @Inject constructor(
is MenuUiAction.OnShowMoreClick -> navigateToLikedBooth()
is MenuUiAction.OnContactClick -> navigateToContact()
is MenuUiAction.OnAdministratorModeClick -> navigateToAdministratorMode()
is MenuUiAction.OnWhoAreUInferClick -> navigateToWhoAreUForm()
is MenuUiAction.OnRetryClick -> refresh(action.error)
is MenuUiAction.OnToggleClustering -> updateIsClusteringEnabled(action.isChecked)
}
}

private fun navigateToWhoAreUForm() {
viewModelScope.launch {
_uiEvent.send(MenuUiEvent.NavigateToWhoAreUForm)
}
}

private fun observeLikedFestivals() {
viewModelScope.launch {
likedFestivalRepository.getLikedFestivals().collect { likedFestivalList ->
Expand Down
17 changes: 17 additions & 0 deletions feature/menu/src/main/res/drawable-night/ic_google_form.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,12m-11.25,0a11.25,11.25 0,1 1,22.5 0a11.25,11.25 0,1 1,-22.5 0"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#B6B8C1"/>
<path
android:pathData="M17.82,8.65L13.62,5.15C13.5,5.05 13.38,5 13.2,5H7.2C6.54,5 6,5.45 6,6V18C6,18.55 6.54,19 7.2,19H16.8C17.46,19 18,18.55 18,18V9C18,8.85 17.94,8.75 17.82,8.65ZM13.2,6.2L16.56,9H13.2V6.2ZM16.8,18H7.2V6H12V9C12,9.55 12.54,10 13.2,10H16.8V18Z"
android:fillColor="#B6B8C1"/>
<path
android:pathData="M8.399,15H15.599V16H8.399V15ZM8.399,12H15.599V13H8.399V12Z"
android:fillColor="#B6B8C1"/>
</vector>
17 changes: 17 additions & 0 deletions feature/menu/src/main/res/drawable/ic_google_form.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,12m-11.25,0a11.25,11.25 0,1 1,22.5 0a11.25,11.25 0,1 1,-22.5 0"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#45464A"/>
<path
android:pathData="M17.82,8.65L13.62,5.15C13.5,5.05 13.38,5 13.2,5H7.2C6.54,5 6,5.45 6,6V18C6,18.55 6.54,19 7.2,19H16.8C17.46,19 18,18.55 18,18V9C18,8.85 17.94,8.75 17.82,8.65ZM13.2,6.2L16.56,9H13.2V6.2ZM16.8,18H7.2V6H12V9C12,9.55 12.54,10 13.2,10H16.8V18Z"
android:fillColor="#45464A"/>
<path
android:pathData="M8.399,15H15.599V16H8.399V15ZM8.399,12H15.599V13H8.399V12Z"
android:fillColor="#45464A"/>
</vector>
1 change: 1 addition & 0 deletions feature/menu/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<string name="menu_questions">이용 문의</string>
<string name="menu_admin_mode">운영자 모드 진입</string>
<string name="clustering">지도 위에 부스 묶어서 보기</string>
<string name="who_are_u_infer">Who Are U 정체 추리</string>

</resources>
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ UNIFEST_CONTACT_URL="http://pf.kakao.com/_KxaaDG/chat"
UNIFEST_WEB_URL="https://unifest-web-245.pages.dev/"
UNIFEST_PRIVATE_POLICY_URL="https://beaded-alley-5ed.notion.site/0398cc021c9d4879bdfbcd031d56da5e?pvs=4"
UNIFEST_THIRD_PARTY_POLICY_URL="https://beaded-alley-5ed.notion.site/3-f1a3be0abb3840799b1131b1c7b5d2ca?pvs=4"
WHO_ARE_U_INFER_FORM_URL="https://forms.gle/XuiJcChyazk2Bg3Q6"
org.gradle.configuration-cache=true
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ androidx-hilt-navigation-compose = "1.2.0"
androidx-test-core = "1.7.0"

desugar-jdk-libs = "2.1.5"
hilt = "2.56.2"
hilt = "2.57.1"
javax-inject = "1"
retrofit = "2.12.0"
okhttp = "5.1.0"
Expand All @@ -55,7 +55,7 @@ compose-stable-marker = "1.0.7"
# compose-investigator = "1.5.11-0.2.1"
landscapist = "2.5.1"
balloon = "1.6.13"
calendar-compose = "2.7.0"
calendar-compose = "2.8.0"
flexible-bottomsheet = "0.1.5"
compose-effects = "0.1.4"
compose-unstyled = "1.42.0"
Expand Down
Loading