-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feature/implement-profile-create
- Loading branch information
Showing
21 changed files
with
1,310 additions
and
13 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
<resources> | ||
<string name="app_name">mission-mate</string> | ||
|
||
<string name="monday_short">월</string> | ||
<string name="tuesday_short">화</string> | ||
<string name="wednesday_short">수</string> | ||
<string name="thursday_short">목</string> | ||
<string name="friday_short">금</string> | ||
<string name="saturday_short">토</string> | ||
<string name="sunday_short">일</string> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...n/java/com/goalpanzi/mission_mate/feature/onboarding/component/BoardSetupNavigationBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.goalpanzi.mission_mate.feature.onboarding.component | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.layout.wrapContentHeight | ||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.filled.KeyboardArrowLeft | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.IconButton | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.unit.dp | ||
import com.goalpanzi.mission_mate.core.designsystem.theme.ColorGray1_FF404249 | ||
import com.goalpanzi.mission_mate.core.designsystem.theme.MissionMateTypography | ||
import com.goalpanzi.mission_mate.feature.onboarding.R | ||
|
||
@Composable | ||
fun BoardSetupNavigationBar( | ||
onBackClick: () -> Unit, | ||
currentStep: () -> Int, | ||
modifier: Modifier = Modifier, | ||
maxStep: Int = 3, | ||
) { | ||
Column( | ||
modifier = modifier | ||
) { | ||
IconButton( | ||
modifier = Modifier.padding(start = 4.dp), | ||
onClick = onBackClick | ||
) { | ||
Icon( | ||
modifier = Modifier.size(24.dp), | ||
imageVector = Icons.Default.KeyboardArrowLeft, // merge 전까지 임시 사용 | ||
contentDescription = null | ||
) | ||
} | ||
Row( | ||
modifier = Modifier.padding(16.dp), | ||
verticalAlignment = Alignment.CenterVertically | ||
) { | ||
Text( | ||
text = stringResource( | ||
id = when (currentStep()) { | ||
1 -> R.string.onboarding_board_setup_mission_title | ||
2 -> R.string.onboarding_board_setup_schedule_title | ||
else -> R.string.onboarding_board_setup_verification_time_title | ||
} | ||
), | ||
modifier = Modifier | ||
.wrapContentHeight() | ||
.weight(1f) | ||
.padding(start = 8.dp, end = 8.dp), | ||
style = MissionMateTypography.heading_sm_bold, | ||
color = ColorGray1_FF404249 | ||
) | ||
OutlinedTextBox( | ||
text = "${currentStep()}/$maxStep", | ||
textStyle = MissionMateTypography.body_lg_regular | ||
) | ||
} | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
...src/main/java/com/goalpanzi/mission_mate/feature/onboarding/component/DatePickerDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package com.goalpanzi.mission_mate.feature.onboarding.component | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.DatePicker | ||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.SelectableDates | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.rememberDatePickerState | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
import androidx.compose.ui.window.Dialog | ||
import androidx.compose.ui.window.DialogProperties | ||
import com.goalpanzi.mission_mate.core.designsystem.component.MissionMateButton | ||
import com.goalpanzi.mission_mate.core.designsystem.component.MissionMateButtonType | ||
import com.goalpanzi.mission_mate.feature.onboarding.util.DateUtils.localDateToMillis | ||
import java.time.LocalDate | ||
|
||
@OptIn(ExperimentalMaterial3Api::class) | ||
@Composable | ||
fun DatePickerDialog( | ||
selectedDate: LocalDate?, | ||
selectableStartDate: LocalDate?, | ||
selectableEndDate: LocalDate?, | ||
onSuccess: (Long) -> Unit, | ||
onDismiss: () -> Unit | ||
) { | ||
val datePickerState = rememberDatePickerState( | ||
initialSelectedDateMillis = selectedDate?.let { localDateToMillis(it) }, | ||
selectableDates = object : SelectableDates { | ||
override fun isSelectableDate(utcTimeMillis: Long): Boolean { | ||
val startMillis = localDateToMillis(selectableStartDate) | ||
val endMillis = localDateToMillis(selectableEndDate) | ||
val currentMillis = utcTimeMillis | ||
return (startMillis ?: Long.MIN_VALUE) <= currentMillis && (endMillis | ||
?: Long.MAX_VALUE) >= currentMillis | ||
} | ||
} | ||
) | ||
Dialog( | ||
properties = DialogProperties(usePlatformDefaultWidth = false), | ||
onDismissRequest = onDismiss | ||
) { | ||
Surface( | ||
modifier = Modifier | ||
.padding(horizontal = 4.dp, vertical = 12.dp) | ||
.fillMaxWidth() | ||
) { | ||
Column( | ||
verticalArrangement = Arrangement.spacedBy(4.dp), | ||
horizontalAlignment = Alignment.CenterHorizontally | ||
) { | ||
|
||
DatePicker(state = datePickerState) | ||
MissionMateButton( | ||
buttonType = if (datePickerState.selectedDateMillis == null) MissionMateButtonType.DISABLED | ||
else MissionMateButtonType.SECONDARY, | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.padding(horizontal = 20.dp, vertical = 12.dp), | ||
onClick = { | ||
datePickerState.selectedDateMillis?.let { onSuccess(it) } | ||
} | ||
) { | ||
Text(text = "Ok") | ||
} | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...src/main/java/com/goalpanzi/mission_mate/feature/onboarding/model/VerificationTimeType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.goalpanzi.mission_mate.feature.onboarding.model | ||
|
||
import androidx.annotation.StringRes | ||
import com.goalpanzi.mission_mate.feature.onboarding.R | ||
|
||
enum class VerificationTimeType( | ||
@StringRes val titleId : Int | ||
) { | ||
Am(R.string.onboarding_board_setup_verification_time_input_content_am), | ||
Pm(R.string.onboarding_board_setup_verification_time_input_content_pm), | ||
All(R.string.onboarding_board_setup_verification_time_input_content_all) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...java/com/goalpanzi/mission_mate/feature/onboarding/screen/boardsetup/BoardSetupMission.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.goalpanzi.mission_mate.feature.onboarding.screen.boardsetup | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.unit.dp | ||
import com.goalpanzi.mission_mate.core.designsystem.component.MissionMateTextFieldGroup | ||
import com.goalpanzi.mission_mate.feature.onboarding.R | ||
|
||
@Composable | ||
fun BoardSetupMission( | ||
missionTitle : String, | ||
onTitleChange : (String) -> Unit, | ||
modifier: Modifier = Modifier | ||
){ | ||
Column( | ||
modifier = modifier | ||
.fillMaxSize() | ||
.padding(horizontal = 24.dp) | ||
) { | ||
BoardSetupDescription( | ||
text = stringResource(id = R.string.onboarding_board_setup_mission_description), | ||
colorTargetTexts = listOf( | ||
stringResource(R.string.onboarding_board_setup_mission_description_color_target1), | ||
stringResource(R.string.onboarding_board_setup_mission_description_color_target2) | ||
) | ||
) | ||
MissionMateTextFieldGroup( | ||
modifier = modifier.fillMaxWidth(), | ||
text = missionTitle, | ||
onValueChange = onTitleChange, | ||
useMaxLength = true, | ||
maxLength = 12, | ||
titleId = R.string.onboarding_board_setup_mission_input_title, | ||
hintId = R.string.onboarding_board_setup_mission_input_hint, | ||
guidanceId = R.string.onboarding_board_setup_mission_input_guide, | ||
) | ||
} | ||
} |
Oops, something went wrong.