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 @@ -103,10 +103,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>(
// false
// }

R.id.favorite_menu -> {
navController.navigate(R.id.favoriteFragment)
true
}
//TODO 찜 기능 완성 시
// R.id.favorite_menu -> {
// navController.navigate(R.id.favoriteFragment)
// true
// }

R.id.mypage_menu -> {
navController.navigate(R.id.myPageFragment)
Expand All @@ -122,8 +123,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(
navController.addOnDestinationChangedListener { _, destination, _ ->
val menuItemId = when (destination.id) {
R.id.cafeteria_menu -> R.id.cafeteria_menu
R.id.mapFragment, R.id.favoriteDetailFragment -> R.id.map_menu
R.id.favoriteFragment -> R.id.favorite_menu
R.id.mapFragment, R.id.favoriteDetailFragment, R.id.favoriteFragment -> R.id.map_menu
R.id.myPageFragment -> R.id.mypage_menu
else -> null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,15 @@ class InfoBottomSheetFragment : BottomSheetDialogFragment() {
analyticsTracker.track(CafeteriaAnalyticsEvent.RestaurantInfoClicked(restaurantType))

binding.tvName.text = getString(restaurantType.displayNameResId)
binding.tvLocation.text = getString(restaurantType.locationResId)
binding.tvTime.text = getString(restaurantType.timeResId)
binding.tvEtc.text = getString(restaurantType.etcResId)

viewLifecycleOwner.lifecycleScope.launch {
val restaurantInfo = infoViewModel.getRestaurantInfo(restaurantType)
val binding = _binding ?: return@launch

restaurantInfo?.let {
binding.tvLocation.text = it.location
binding.tvTime.text = it.time
binding.tvEtc.text = it.etc

Glide.with(binding.ivCafeteriaPhoto)
.load(it.image)
.into(binding.ivCafeteriaPhoto)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class MenuAdapter(
}

binding.tvCafeteria.text = binding.root.context.getString(sectionModel.cafeteria.displayNameResId)
binding.tvCafeteriaLocation.text = sectionModel.cafeteriaLocation
binding.tvCafeteriaLocation.text =
binding.root.context.getString(sectionModel.cafeteria.locationResId)

binding.rvMenu.apply {
setHasFixedSize(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
Expand All @@ -36,6 +37,7 @@ import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand All @@ -59,6 +61,7 @@ import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.IntOffset
Expand All @@ -74,14 +77,14 @@ import com.eatssu.common.enums.StoreType
import com.eatssu.design_system.component.DelayedLoadingIndicator
import com.eatssu.design_system.component.EatSsuSnackbar
import com.eatssu.design_system.component.EatSsuSnackbarType
import com.eatssu.design_system.component.EatSsuTopBar
import com.eatssu.design_system.theme.EatssuTheme
import com.eatssu.design_system.theme.Error
import com.eatssu.design_system.theme.Gray200
import com.eatssu.design_system.theme.Gray300
import com.eatssu.design_system.theme.Gray400
import com.eatssu.design_system.theme.Gray500
import com.eatssu.design_system.theme.Gray600
import com.eatssu.design_system.theme.Gray700
import com.eatssu.design_system.theme.Primary
import com.eatssu.design_system.theme.Secondary
import com.eatssu.design_system.theme.White
Expand Down Expand Up @@ -141,20 +144,47 @@ internal fun FavoriteScreen(
TrackScreenViewEvent(ScreenId.MAP_FAVORITE)

Scaffold(
contentWindowInsets = WindowInsets(0.dp),
topBar = {
EatSsuTopBar(
title = stringResource(R.string.favorite_title),
onBack = {
Column(
modifier = Modifier
.fillMaxWidth()
.background(White)
) {
Box(
modifier = Modifier
.fillMaxWidth()
.padding(top = 17.dp)
.height(56.dp),
contentAlignment = Alignment.Center,
) {
Text(
text = stringResource(R.string.favorite_title),
style = EatssuTheme.typography.subtitle1,
color = Gray700,
textAlign = TextAlign.Center,
)

if (isEditMode) {
isEditMode = false
selectedPartnershipIds = emptySet()
} else {
onBackToMap()
IconButton(
onClick = {
isEditMode = false
selectedPartnershipIds = emptySet()
},
modifier = Modifier
.align(Alignment.CenterStart)
.padding(start = 12.dp),
) {
Icon(
painter = painterResource(id = R.drawable.ic_arrow_left),
contentDescription = "뒤로가기",
tint = Gray500,
)
}
}
},
)
},
modifier = Modifier.padding(top = 17.dp)
}
}
}
) { innerPadding ->
Box(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@ fun GoodPriceMapScreen(
},
// 개별 마커 클릭 시 업소 상세 바텀시트 호출
onClickLeaf = { leaf, _ ->
val store = leaf.tag as? GoodPriceStore ?: return@Clustering true
onStoreClick(store)
(leaf.tag as? GoodPriceStore)?.let { store ->
onStoreClick(store)
}
true
},
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.eatssu.android.presentation.goodprice.component

import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
Expand All @@ -12,14 +14,18 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.eatssu.common.enums.GoodPriceCategory
import com.eatssu.design_system.theme.EatssuTheme
import com.eatssu.design_system.theme.Gray300
import com.eatssu.design_system.theme.Gray400
import com.eatssu.design_system.theme.Primary
import com.eatssu.design_system.theme.White

Expand All @@ -38,28 +44,43 @@ fun GoodPriceFilterRow(

LazyRow(
modifier = modifier.fillMaxWidth(),
contentPadding = PaddingValues(horizontal = 16.dp),
contentPadding = PaddingValues(horizontal = 24.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
items(categories, key = { it.name }) { category ->
val isSelected = category == selectedCategory

// 필터 칩 아이템 (테두리 없는 깔끔한 캡슐형 칩)
Box(
modifier = Modifier
.shadow(
elevation = 3.dp,
shape = CircleShape,
ambientColor = Color(0x1A949494),
spotColor = Color(0x1A949494),
)
.clip(CircleShape)
.background(if (isSelected) Primary else White)
.clickable { onCategorySelected(category) }
.padding(horizontal = 20.dp, vertical = 9.dp),
.border(
width = if (isSelected) 0.dp else 1.dp,
color = if (isSelected) Color.Transparent else Gray300,
shape = CircleShape,
)
.clickable(
interactionSource = remember { MutableInteractionSource() },
indication = null,
onClick = { onCategorySelected(category) },
)
.padding(horizontal = 14.dp, vertical = 8.dp),
contentAlignment = Alignment.Center,
) {
Text(
text = category.displayName,
// Body3 글꼴을 사용하며, 선택된 경우에만 Bold 처리
style = EatssuTheme.typography.body3.copy(
fontWeight = if (isSelected) FontWeight.Bold else FontWeight.Normal,
),
color = if (isSelected) White else Color(0xFF8E8E93),
text = stringResource(id = category.displayNameResId),
style = if (isSelected) {
EatssuTheme.typography.body2
} else {
EatssuTheme.typography.body3
},
color = if (isSelected) White else Gray400,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import com.eatssu.android.R
Expand Down Expand Up @@ -99,7 +100,7 @@ fun GoodPriceStoreBottomSheet(
modifier = Modifier.size(16.dp),
)
Text(
text = storeDetail.category.displayName,
text = stringResource(id = storeDetail.category.displayNameResId),
style = EatssuTheme.typography.body2,
color = Gray600,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ fun LoginScreen(
)

Text(
text = "내 주변 착한 한 끼를 찾아보세요",
text = stringResource(id = R.string.btn_browse_good_price_stores_subtitle),
style = EatssuTheme.typography.caption2,
color = Black,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import android.view.ViewGroup
import androidx.compose.ui.platform.ComposeView
import androidx.fragment.app.Fragment
import com.eatssu.android.analytics.ProvideAnalyticsTracker
import com.eatssu.android.presentation.MainActivity
import com.eatssu.common.analytics.AnalyticsTracker
import com.eatssu.design_system.theme.EatssuTheme
import dagger.hilt.android.AndroidEntryPoint
Expand Down Expand Up @@ -38,9 +37,6 @@ class MapFragment : Fragment() {
EatssuTheme {
MapRoute(
mapExternalNavigator = mapExternalNavigator,
onFavoriteClick = {
(requireActivity() as MainActivity).openFavoriteTab()
},
)
}
}
Expand Down
Loading
Loading