-
Notifications
You must be signed in to change notification settings - Fork 2
[Mod/#54] GUI 반영 #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mod/#54] GUI 반영 #57
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| package com.paw.key.core.designsystem.component | ||
|
|
||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.clickable | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.Spacer | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.height | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.layout.wrapContentSize | ||
| import androidx.compose.material.icons.Icons | ||
| import androidx.compose.material.icons.filled.Close | ||
| import androidx.compose.material3.Icon | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.layout.ContentScale | ||
| import androidx.compose.ui.platform.LocalContext | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import coil.compose.AsyncImage | ||
|
|
||
| import androidx.compose.ui.window.Dialog | ||
| import coil.request.ImageRequest | ||
| import com.paw.key.core.designsystem.theme.PawKeyTheme | ||
|
|
||
| @Composable | ||
| fun ImageModal( | ||
| imageUrl: String, | ||
| onDismiss: () -> Unit | ||
| ) { | ||
| Dialog(onDismissRequest = onDismiss) { | ||
| Column( | ||
| modifier = Modifier | ||
| .padding(16.dp) | ||
| .size(width = 328.dp, height = 228.dp) | ||
| .wrapContentSize(), | ||
| horizontalAlignment = Alignment.End | ||
| ) { | ||
| Icon( | ||
| imageVector = Icons.Default.Close, | ||
| contentDescription = "닫기", | ||
| tint = Color.White, | ||
| modifier = Modifier | ||
| .align(Alignment.End) | ||
| .clickable { onDismiss() } | ||
| .padding(bottom = 8.dp) | ||
| .size(24.dp) | ||
| ) | ||
| AsyncImage( | ||
| model = ImageRequest.Builder(LocalContext.current) | ||
| .data("https://pawkey-server.com/image.jpg") // ← 서버에서 받은 이미지 URL 넣깅 | ||
| .crossfade(true) | ||
| .build(), | ||
| contentDescription = null, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. null 금지
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. contentdesription 은 null로 하지 말아주잉 |
||
| modifier = Modifier | ||
| ) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| fun ImageModalPreview() { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. private |
||
| PawKeyTheme { | ||
| ImageModal( | ||
| imageUrl = "https://pawkey-server.com/image.jpg", | ||
| onDismiss = {} | ||
| ) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,26 @@ | ||
| package com.paw.key.presentation.ui.mypage | ||
|
|
||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.lazy.LazyColumn | ||
| import androidx.compose.foundation.rememberScrollState | ||
| import androidx.compose.foundation.verticalScroll | ||
| import androidx.compose.material3.SnackbarHostState | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.runtime.getValue | ||
| import androidx.compose.runtime.mutableStateOf | ||
| import androidx.compose.runtime.remember | ||
| import androidx.compose.runtime.setValue | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.paw.key.core.designsystem.component.CourseDetail | ||
| import com.paw.key.core.designsystem.component.ImageModal | ||
| import com.paw.key.core.designsystem.component.PawkeyButton | ||
| import com.paw.key.core.designsystem.theme.PawKeyTheme | ||
| import com.paw.key.core.designsystem.theme.White1 | ||
|
|
||
| @Composable | ||
| fun SavedDetailRoute( | ||
|
|
@@ -28,34 +33,49 @@ fun SavedDetailRoute( | |
| modifier = modifier | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 파라미터 누락된건가유 |
||
| ) | ||
| } | ||
|
|
||
| @Composable | ||
| fun SavedCourseDetailScreen( | ||
| navigateUp: () -> Unit, | ||
| modifier: Modifier = Modifier | ||
| ){ | ||
| Column( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .padding(16.dp) | ||
| .verticalScroll(rememberScrollState()) | ||
| ) { | ||
| CourseDetail( | ||
| title = "한강 산책로", | ||
| petName = "후추", | ||
| date = "2025/06/02", | ||
| location = "뚝섬유원지", | ||
| distance = "4.5km", | ||
| option = listOf("풍경이 좋아요", "조용해요", "길이 깨끗해요"), | ||
| time = "1시간 30분 소요" | ||
| ) | ||
| PawkeyButton( | ||
| text = "해당 루트로 산책하기", | ||
| enabled = true, | ||
| onClick = {}, | ||
| modifier = Modifier | ||
| var isImageExpanded by remember { mutableStateOf(false) } | ||
|
|
||
| Box(modifier = Modifier.fillMaxSize()) { | ||
| LazyColumn( | ||
| modifier = modifier | ||
| .fillMaxWidth() | ||
| .padding(top = 16.dp) | ||
| ) | ||
| .padding(16.dp) | ||
| .background(color = White1) | ||
| ) { | ||
| item { | ||
| CourseDetail( | ||
| title = "한강 산책로", | ||
| petName = "후추", | ||
| date = "2025/06/02", | ||
| location = "뚝섬유원지", | ||
| distance = "4.5km", | ||
| option = listOf("풍경이 좋아요", "조용해요", "길이 깨끗해요"), | ||
| time = "1시간 30분 소요", | ||
| onImageClick = { isImageExpanded = true } // ← 콜백 전달 | ||
| ) | ||
| PawkeyButton( | ||
| text = "해당 루트로 산책하기", | ||
| enabled = true, | ||
| onClick = {}, | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .padding(top = 16.dp) | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| if (isImageExpanded) { | ||
| ImageModal( | ||
| imageUrl = "https://pawkey-server.com/image.jpg", | ||
| onDismiss = { isImageExpanded = false } | ||
| ) | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?