-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT/#300] 시스템 점검을 구현합니다. #301
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
Changes from 1 commit
a0af28f
74eba47
99f30c0
c4eb6a8
9858bb3
82f6db7
dbbb5e4
f8da747
f6ab945
864dcbd
01f2b67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,105 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| package com.sopt.clody.presentation.ui.component.dialog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.foundation.Image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.foundation.background | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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.wrapContentSize | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.material3.Button | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.material3.ButtonDefaults | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.material3.Card | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.material3.CardDefaults | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.material3.Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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.res.painterResource | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.ui.text.style.TextAlign | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.ui.unit.dp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.ui.window.Dialog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import androidx.compose.ui.window.DialogProperties | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.sopt.clody.R | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.sopt.clody.presentation.utils.base.BasePreview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.sopt.clody.presentation.utils.base.ClodyPreview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import com.sopt.clody.ui.theme.ClodyTheme | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @Composable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fun InspectionDialog( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| onDismiss: () -> Unit, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Dialog( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| onDismissRequest = onDismiss, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| properties = DialogProperties( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dismissOnClickOutside = false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| usePlatformDefaultWidth = false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Box( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| modifier = Modifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .fillMaxSize() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .background(Color.Black.copy(alpha = 0.5f)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .wrapContentSize(Alignment.Center) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .padding(horizontal = 24.dp), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Card( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shape = RoundedCornerShape(12.dp), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| colors = CardDefaults.cardColors(containerColor = ClodyTheme.colors.white), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Column( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| modifier = Modifier.padding(20.dp), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| horizontalAlignment = Alignment.CenterHorizontally, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Image( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| painter = painterResource(id = R.drawable.img_inspection_dialog), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contentDescription = null, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Spacer(modifier = Modifier.height(20.dp)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+60
to
+64
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.
Provide a meaningful - Image(
- painter = painterResource(id = R.drawable.img_inspection_dialog),
- contentDescription = null,
- )
+ Image(
+ painter = painterResource(id = R.drawable.img_inspection_dialog),
+ contentDescription = stringResource(R.string.desc_inspection_image), // or "" if purely decorative
+ )📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Text( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| text = "보다 안정적인 클로디 서비스를 위해\n시스템 점검 중이에요. 곧 다시 만나요!", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| color = ClodyTheme.colors.gray03, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| textAlign = TextAlign.Center, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| style = ClodyTheme.typography.body3Medium, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Spacer(modifier = Modifier.height(8.dp)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Text( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| text = "점검시간 : ", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| color = ClodyTheme.colors.gray04, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| textAlign = TextAlign.Center, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| style = ClodyTheme.typography.body3Medium, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+65
to
+77
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. 🛠️ Refactor suggestion Hard-coded Korean strings hinder localisation & reuse Move the message and time label to - text = "보다 안정적인 클로디 서비스를 위해\n시스템 점검 중이에요. 곧 다시 만나요!",
+ text = stringResource(R.string.inspection_dialog_message),
...
- text = "점검시간 : ",
+ text = stringResource(R.string.inspection_dialog_time_prefix, inspectionTime),📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Spacer(modifier = Modifier.height(24.dp)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Button( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| onClick = onDismiss, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| modifier = Modifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .fillMaxWidth(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shape = RoundedCornerShape(8.dp), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| colors = ButtonDefaults.buttonColors(ClodyTheme.colors.mainYellow), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Text( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| text = "확인 후 앱 종료", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| color = ClodyTheme.colors.gray02, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| style = ClodyTheme.typography.body3SemiBold, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @ClodyPreview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @Composable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private fun PreviewInspectionDialog() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BasePreview { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| InspectionDialog( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| onDismiss = {}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.