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
15 changes: 15 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-feature android:name="android.hardware.camera" android:required="true" />

<application
android:name=".BitnagilApplication"
Expand Down Expand Up @@ -41,5 +46,15 @@
android:scheme="kakao${KAKAO_NATIVE_APP_KEY}" />
</intent-filter>
</activity>

<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
16 changes: 16 additions & 0 deletions app/src/main/java/com/threegap/bitnagil/MainNavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.threegap.bitnagil.presentation.login.LoginScreenContainer
import com.threegap.bitnagil.presentation.onboarding.OnBoardingScreenContainer
import com.threegap.bitnagil.presentation.onboarding.OnBoardingViewModel
import com.threegap.bitnagil.presentation.onboarding.model.navarg.OnBoardingScreenArg
import com.threegap.bitnagil.presentation.report.ReportScreenContainer
import com.threegap.bitnagil.presentation.routinelist.RoutineListScreenContainer
import com.threegap.bitnagil.presentation.setting.SettingScreenContainer
import com.threegap.bitnagil.presentation.splash.SplashScreenContainer
Expand Down Expand Up @@ -134,6 +135,11 @@ fun MainNavHost(
launchSingleTop = true
}
},
navigateToReport = {
navigator.navController.navigate(Route.Report) {
launchSingleTop = true
}
},
)
}

Expand Down Expand Up @@ -289,5 +295,15 @@ fun MainNavHost(
},
)
}

composable<Route.Report> {
ReportScreenContainer(
navigateToBack = {
if (navigator.navController.previousBackStackEntry != null) {
navigator.navController.popBackStack()
}
},
)
}
}
}
3 changes: 3 additions & 0 deletions app/src/main/java/com/threegap/bitnagil/Route.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ sealed interface Route {

@Serializable
data object Guide : Route

@Serializable
data object Report : Route
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ fun HomeNavHost(
navigateToRegisterRoutine: (String?) -> Unit,
navigateToEmotion: () -> Unit,
navigateToRoutineList: (String) -> Unit,
navigateToReport: () -> Unit,
) {
val navigator = rememberHomeNavigator()
var showFloatingOverlay by remember { mutableStateOf(false) }
Expand Down Expand Up @@ -106,6 +107,11 @@ fun HomeNavHost(

BitnagilFloatingActionMenu(
actions = listOf(
FloatingActionItem(
icon = R.drawable.ic_complaint,
text = "제보하기",
onClick = { navigateToReport() },
),
FloatingActionItem(
icon = R.drawable.ic_routine_add,
text = "루틴 등록",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
Expand Down Expand Up @@ -101,7 +102,7 @@ fun BitnagilFloatingActionMenu(
),
) {
Column(
modifier = Modifier.padding(16.dp),
modifier = Modifier.padding(vertical = 16.dp),
verticalArrangement = Arrangement.spacedBy(24.dp),
) {
actions.forEach { action ->
Expand Down Expand Up @@ -173,6 +174,8 @@ private fun FloatingActionMenuItem(
horizontalArrangement = Arrangement.spacedBy(14.dp),
modifier = modifier
.scale(scale)
.padding(horizontal = 16.dp)
.width(112.dp)
.clickableWithoutRipple { onClick() },
) {
BitnagilIcon(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,20 @@ data class BitnagilTextButtonColor(
) {
companion object {
@Composable
fun default(): BitnagilTextButtonColor = BitnagilTextButtonColor(
defaultBackgroundColor = BitnagilTheme.colors.coolGray10,
pressedBackgroundColor = BitnagilTheme.colors.coolGray5,
disabledBackgroundColor = BitnagilTheme.colors.coolGray96,
defaultTextColor = BitnagilTheme.colors.white,
pressedTextColor = BitnagilTheme.colors.coolGray20,
disabledTextColor = BitnagilTheme.colors.white,
fun default(
defaultBackgroundColor: Color = BitnagilTheme.colors.coolGray10,
pressedBackgroundColor: Color = BitnagilTheme.colors.coolGray5,
disabledBackgroundColor: Color = BitnagilTheme.colors.coolGray96,
defaultTextColor: Color = BitnagilTheme.colors.white,
pressedTextColor: Color = BitnagilTheme.colors.coolGray20,
disabledTextColor: Color = BitnagilTheme.colors.white,
): BitnagilTextButtonColor = BitnagilTextButtonColor(
defaultBackgroundColor = defaultBackgroundColor,
pressedBackgroundColor = pressedBackgroundColor,
disabledBackgroundColor = disabledBackgroundColor,
defaultTextColor = defaultTextColor,
pressedTextColor = pressedTextColor,
disabledTextColor = disabledTextColor,
)

@Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package com.threegap.bitnagil.designsystem.component.atom

import androidx.compose.foundation.background
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
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.graphics.Color
import androidx.compose.ui.text.TextLayoutResult
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.threegap.bitnagil.designsystem.BitnagilTheme

@Composable
fun BitnagilTextField(
value: String,
onValueChange: (String) -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
textStyle: TextStyle = BitnagilTheme.typography.body2Medium,
textColor: Color = BitnagilTheme.colors.coolGray10,
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
keyboardActions: KeyboardActions = KeyboardActions.Default,
singleLine: Boolean = false,
maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
minLines: Int = 1,
visualTransformation: VisualTransformation = VisualTransformation.None,
onTextLayout: (TextLayoutResult) -> Unit = {},
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
placeholder: @Composable (() -> Unit)? = null,
) {
BasicTextField(
value = value,
onValueChange = onValueChange,
modifier = modifier
.fillMaxWidth()
.background(
color = BitnagilTheme.colors.coolGray99,
shape = RoundedCornerShape(12.dp),
)
.padding(vertical = 16.dp, horizontal = 20.dp),
textStyle = textStyle.copy(color = textColor),
enabled = enabled,
keyboardOptions = keyboardOptions,
keyboardActions = keyboardActions,
singleLine = singleLine,
maxLines = maxLines,
minLines = minLines,
visualTransformation = visualTransformation,
onTextLayout = onTextLayout,
interactionSource = interactionSource,
) { innerTextField ->
Box(
contentAlignment = Alignment.TopStart,
) {
if (value.isEmpty() && placeholder != null) {
placeholder()
}
innerTextField()
}
}
}

@Preview
@Composable
private fun Preview() {
BitnagilTextField(
value = "",
onValueChange = {},
placeholder = {
Text(
text = "기타사항(직접 입력)",
color = BitnagilTheme.colors.coolGray80,
style = BitnagilTheme.typography.subtitle1Medium,
)
},
)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.threegap.bitnagil.presentation.setting.component.block
package com.threegap.bitnagil.designsystem.component.block

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
Expand All @@ -22,7 +22,11 @@ import com.threegap.bitnagil.designsystem.component.atom.BitnagilTextButtonColor

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun LogoutConfirmDialog(
fun BitnagilAlertDialog(
title: String,
description: String,
dismissButtonText: String,
confirmButtonText: String,
onDismiss: () -> Unit,
onConfirm: () -> Unit,
modifier: Modifier = Modifier,
Expand All @@ -45,15 +49,15 @@ fun LogoutConfirmDialog(
verticalArrangement = Arrangement.Center,
) {
Text(
text = "로그아웃할까요?",
text = title,
color = BitnagilTheme.colors.coolGray10,
style = BitnagilTheme.typography.subtitle1SemiBold,
)

Spacer(modifier = Modifier.height(6.dp))

Text(
text = "이 기기에서 계정이 로그아웃되고, 다시\n로그인해야 서비스를 계속 이용할 수 있어요.",
text = description,
color = BitnagilTheme.colors.coolGray40,
style = BitnagilTheme.typography.body2Medium,
)
Expand All @@ -65,15 +69,15 @@ fun LogoutConfirmDialog(
horizontalArrangement = Arrangement.spacedBy(12.dp),
) {
BitnagilTextButton(
text = "취소",
text = dismissButtonText,
onClick = onDismiss,
colors = BitnagilTextButtonColor.cancel(),
textStyle = BitnagilTheme.typography.body2Medium,
modifier = Modifier.weight(1f),
)

BitnagilTextButton(
text = "로그아웃",
text = confirmButtonText,
onClick = onConfirm,
textStyle = BitnagilTheme.typography.body2Medium,
modifier = Modifier.weight(1f),
Expand All @@ -85,8 +89,12 @@ fun LogoutConfirmDialog(

@Preview
@Composable
private fun LogoutConfirmDialogPreview() {
LogoutConfirmDialog(
private fun Preview() {
BitnagilAlertDialog(
title = "로그아웃 할까요?",
description = "이 기기에서 계정이 로그아웃되고, 다시\n로그인해야 서비스를 계속 이용할 수 있어요.",
dismissButtonText = "취소",
confirmButtonText = "로그아웃",
onDismiss = {},
onConfirm = {},
)
Expand Down
19 changes: 19 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_btn_close_sm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="16"
android:viewportHeight="16">
<group>
<clip-path android:pathData="M0,0h16v16h-16z" />
<path
android:fillColor="#171719"
android:pathData="M7.995,-0.15C8.255,-0.15 8.515,0.03 8.775,0.05C9.035,0.07 9.295,0.09 9.555,0.14C9.815,0.19 10.035,0.34 10.285,0.42C10.535,0.5 10.775,0.58 11.015,0.68C11.255,0.78 11.605,0.66 11.835,0.79C12.065,0.92 12.305,1.05 12.525,1.19C12.745,1.33 13.035,1.42 13.235,1.58C13.435,1.74 13.665,1.92 13.855,2.1C14.045,2.28 14.175,2.55 14.335,2.75C14.495,2.95 14.275,3.44 14.425,3.66C14.575,3.88 15.065,3.88 15.185,4.11C15.305,4.34 15.325,4.63 15.425,4.87C15.525,5.11 15.355,5.44 15.425,5.69C15.495,5.94 15.825,6.12 15.885,6.37C15.945,6.62 15.895,6.9 15.925,7.16C15.955,7.42 15.945,7.68 15.945,7.94C15.945,8.2 16.055,8.47 16.025,8.73C15.995,8.99 15.655,9.2 15.605,9.45C15.555,9.7 15.975,10.08 15.895,10.33C15.815,10.58 15.495,10.76 15.395,11C15.295,11.24 15.115,11.44 14.995,11.67C14.875,11.9 14.615,12.03 14.465,12.25C14.315,12.47 14.555,12.98 14.395,13.18C14.235,13.38 13.775,13.33 13.585,13.52C13.395,13.71 13.325,14.01 13.125,14.18C12.925,14.35 12.725,14.53 12.505,14.68C12.285,14.83 11.945,14.76 11.715,14.88C11.485,15 11.215,15 10.965,15.1C10.715,15.2 10.515,15.33 10.265,15.4C10.015,15.47 9.845,15.87 9.585,15.92C9.325,15.97 9.025,15.68 8.765,15.71C8.505,15.74 8.265,15.71 7.995,15.71C7.725,15.71 7.445,16.17 7.185,16.15C6.925,16.13 6.715,15.71 6.455,15.66C6.195,15.61 5.895,15.73 5.645,15.66C5.395,15.59 5.205,15.33 4.965,15.23C4.725,15.13 4.365,15.27 4.135,15.15C3.905,15.03 3.825,14.64 3.605,14.5C3.385,14.36 2.965,14.47 2.765,14.3C2.565,14.13 2.425,13.87 2.235,13.69C2.045,13.51 1.975,13.21 1.805,13.01C1.635,12.81 1.555,12.55 1.415,12.33C1.275,12.11 1.055,11.94 0.935,11.71C0.815,11.48 0.715,11.24 0.605,11C0.495,10.76 0.375,10.53 0.305,10.27C0.235,10.01 0.215,9.76 0.155,9.5C0.095,9.24 0.265,8.97 0.235,8.71C0.205,8.45 0.105,8.21 0.105,7.95C0.105,7.69 0.195,7.44 0.215,7.19C0.235,6.94 -0.075,6.61 -0.025,6.35C0.025,6.09 0.255,5.87 0.325,5.62C0.395,5.37 0.405,5.09 0.505,4.85C0.605,4.61 0.835,4.42 0.955,4.19C1.075,3.96 1.315,3.81 1.465,3.59C1.615,3.37 1.445,2.92 1.615,2.72C1.785,2.52 1.965,2.3 2.155,2.11C2.345,1.92 2.555,1.73 2.755,1.57C2.955,1.41 3.385,1.53 3.605,1.38C3.825,1.23 3.865,0.79 4.105,0.67C4.345,0.55 4.745,0.8 4.995,0.7C5.245,0.6 5.395,0.29 5.655,0.21C5.915,0.13 6.165,0.08 6.425,0.03C6.685,-0.02 6.945,-0.05 7.215,-0.08C7.485,-0.11 7.745,-0.15 8.005,-0.15L7.995,-0.15Z" />
<path
android:fillColor="#00000000"
android:pathData="M10.725,10.55C10.455,10.28 10.485,10.26 10.225,9.99C9.965,9.72 9.945,9.74 9.685,9.47C9.425,9.2 9.205,9.42 8.935,9.15C8.665,8.88 8.755,8.79 8.485,8.53C8.215,8.27 8.275,8.2 8.005,7.94M8.065,7.88C7.795,7.61 7.825,7.59 7.565,7.32C7.305,7.05 7.285,7.07 7.025,6.8C6.765,6.53 6.545,6.75 6.275,6.48C6.005,6.21 6.095,6.12 5.825,5.86C5.555,5.6 5.615,5.53 5.345,5.27M8.065,8.01C8.335,7.74 8.355,7.77 8.625,7.51C8.895,7.25 8.875,7.23 9.145,6.97C9.415,6.71 9.195,6.49 9.465,6.22C9.735,5.95 9.825,6.04 10.085,5.77C10.345,5.5 10.415,5.56 10.675,5.29M7.925,7.88C7.655,8.15 7.635,8.12 7.365,8.38C7.095,8.64 7.115,8.66 6.845,8.92C6.575,9.18 6.795,9.4 6.525,9.67C6.255,9.94 6.165,9.85 5.905,10.12C5.645,10.39 5.575,10.33 5.315,10.6"
android:strokeWidth="1.33"
android:strokeColor="#ffffff"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</group>
</vector>
13 changes: 13 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_camera.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:fillColor="#00000000"
android:pathData="M12.06,6.316C12.51,6.316 12.52,6.436 12.97,6.436C13.42,6.436 13.43,6.506 13.88,6.506C14.33,6.506 14.33,6.066 14.79,6.066C15.15,6.066 15.45,6.126 15.69,6.136C16.08,6.156 16.44,6.126 16.66,6.236C16.98,6.396 17,6.926 17.16,7.236C17.27,7.446 17.53,7.646 17.55,8.026C17.56,8.276 17.44,8.566 17.44,8.926C17.44,9.316 17.18,9.316 17.18,9.706C17.18,10.096 17.31,10.096 17.31,10.486C17.31,10.876 17.37,10.876 17.37,11.266C17.37,11.656 17.35,11.666 17.35,12.046C17.35,12.426 17.32,12.426 17.32,12.816C17.32,13.206 17.73,13.206 17.73,13.596C17.73,13.946 17.36,14.236 17.35,14.476C17.33,14.856 17.41,15.136 17.3,15.356C17.14,15.666 16.94,16.066 16.63,16.226C16.41,16.336 16.07,16.226 15.69,16.246C15.45,16.256 15.16,16.206 14.8,16.206C14.4,16.206 14.39,16.446 13.99,16.446C13.59,16.446 13.59,16.336 13.18,16.336C12.77,16.336 12.78,16.036 12.37,16.036C11.96,16.036 11.96,16.016 11.56,16.016C11.16,16.016 11.16,16.326 10.76,16.326C10.36,16.326 10.37,16.286 9.96,16.286C9.55,16.286 9.56,16.206 9.15,16.206C8.74,16.206 8.74,15.966 8.34,15.966C7.94,15.966 7.94,16.146 7.54,16.146C7.14,16.146 7.15,16.516 6.74,16.516C6.33,16.516 6.33,15.976 5.93,15.976C5.53,15.976 5.53,16.356 5.13,16.356C4.77,16.356 4.49,16.046 4.25,16.036C3.87,16.016 3.52,16.326 3.3,16.216C2.99,16.056 2.71,15.696 2.55,15.386C2.44,15.166 2.7,14.836 2.68,14.456C2.67,14.216 2.27,13.936 2.27,13.576C2.27,13.186 2.54,13.186 2.54,12.796C2.54,12.406 2.34,12.406 2.34,12.016C2.34,11.626 2.59,11.626 2.59,11.236C2.59,10.846 2.71,10.836 2.71,10.456C2.71,10.076 2.39,10.066 2.39,9.686C2.39,9.306 2.62,9.306 2.62,8.916C2.62,8.556 2.56,8.266 2.57,8.026C2.59,7.636 2.43,7.316 2.54,7.096C2.69,6.776 2.96,6.366 3.27,6.206C3.49,6.086 3.87,6.346 4.25,6.326C4.49,6.316 4.78,6.056 5.14,6.056C5.59,6.056 5.6,6.516 6.05,6.516C6.5,6.516 6.51,6.446 6.96,6.446C7.41,6.446 7.41,6.006 7.87,6.006C7.78,6.006 7.71,6.436 7.67,6.436C7.43,6.406 7.01,6.236 6.88,6.056C6.75,5.876 7.1,5.506 7.15,5.266C7.15,5.226 6.92,5.106 6.96,4.986L7.27,5.086C7.31,4.956 7.22,4.866 7.25,4.806C7.37,4.516 7.4,4.156 7.64,3.976C7.88,3.796 8.22,3.616 8.53,3.586C8.59,3.586 8.67,3.806 8.8,3.806C9.19,3.806 9.19,3.486 9.57,3.486C9.95,3.486 9.96,3.606 10.34,3.606C10.72,3.606 10.73,3.856 11.11,3.856C11.25,3.856 11.32,3.656 11.38,3.656C11.69,3.676 11.87,4.016 12.11,4.196C12.35,4.376 12.85,4.376 12.97,4.666C12.99,4.726 12.72,4.896 12.76,5.026C12.8,5.146 12.76,5.196 12.76,5.246C12.81,5.486 13.09,5.806 12.96,5.986C12.83,6.166 12.45,6.066 12.2,6.096C12.16,6.096 12.12,6.476 12.04,6.476M7.92,6.026C7.9,6.026 7.87,6.466 7.87,6.466C7.87,6.466 7.89,6.026 7.9,6.026C7.9,6.026 7.9,5.956 7.92,5.956M7.92,6.466C8.33,6.466 8.33,6.026 8.73,6.026C9.13,6.026 9.14,5.956 9.55,5.956C9.96,5.956 9.96,6.416 10.37,6.416C10.78,6.416 10.78,6.156 11.19,6.156C11.6,6.156 11.6,6.476 12.01,6.476M12.05,6.026C12.03,6.026 12,6.466 12,6.466C12,6.466 12,6.026 12.02,6.026C12.03,6.026 12.04,5.956 12.05,5.956M9.96,13.506C9.69,13.506 9.37,13.886 9.12,13.806C8.87,13.726 8.53,13.636 8.32,13.486C8.11,13.336 8.23,12.806 8.08,12.596C7.93,12.386 7.58,12.286 7.5,12.036C7.42,11.786 7.7,11.506 7.7,11.236C7.7,10.966 7.62,10.746 7.7,10.506C7.78,10.266 7.7,9.926 7.86,9.716C8.02,9.506 8.18,9.246 8.4,9.096C8.62,8.946 8.96,9.016 9.21,8.936C9.46,8.856 9.69,8.496 9.96,8.496C10.23,8.496 10.53,8.666 10.77,8.746C11.01,8.826 11.14,9.166 11.35,9.316C11.56,9.466 11.88,9.506 12.04,9.716C12.2,9.926 12.07,10.266 12.15,10.516C12.23,10.766 12.66,10.956 12.66,11.226C12.66,11.496 12.31,11.716 12.23,11.966C12.15,12.216 11.99,12.386 11.84,12.596C11.69,12.806 11.76,13.256 11.55,13.416C11.34,13.576 10.95,13.416 10.7,13.506C10.45,13.596 10.23,13.506 9.96,13.506Z"
android:strokeWidth="1.6"
android:strokeColor="#AEB0B6"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>
Loading