Skip to content

Commit

Permalink
Refactor: 휴대폰 번호 인증화면 ui 수정 사항 반영 및 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
kang9366 committed Nov 12, 2024
1 parent 407f164 commit ba51a98
Show file tree
Hide file tree
Showing 14 changed files with 201 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,17 @@ fun ConnectDogNormalButton(
fontSize: Int = 16,
modifier: Modifier = Modifier
.fillMaxWidth()
.height(56.dp)
.height(56.dp),
enabled: Boolean = true,
) {
ConnectDogBottomButton(
onClick = onClick,
content = content,
enabledColor = color,
modifier = modifier,
textColor = textColor,
fontSize = fontSize
fontSize = fontSize,
enabled = enabled
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.kusitms.connectdog.core.util

val String.Companion.empty
get() = ""

fun emptyString(): String = String.empty
1 change: 1 addition & 0 deletions domain/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
10 changes: 10 additions & 0 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
id("java-library")
alias(libs.plugins.org.jetbrains.kotlin.jvm)
}

java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import com.kusitms.connectdog.feature.home.screen.ApplyScreen
import com.kusitms.connectdog.feature.home.screen.CompleteApplyScreen
import com.kusitms.connectdog.feature.home.screen.DetailScreen
import com.kusitms.connectdog.feature.home.screen.FilterSearchRoute
import com.kusitms.connectdog.feature.home.screen.GuideScreen
import com.kusitms.connectdog.feature.home.screen.HomeRoute
import com.kusitms.connectdog.feature.home.screen.IntermediatorProfileScreen
import com.kusitms.connectdog.feature.home.screen.ReviewScreen
Expand Down Expand Up @@ -221,9 +220,9 @@ fun NavGraphBuilder.homeNavGraph(
}

composable(route = HomeRoute.guide) {
GuideScreen(
onBackClick = onBackClick
)
// GuideScreen(
// onBackClick = onBackClick
// )
}

composable(route = HomeRoute.notification) {
Expand Down
4 changes: 4 additions & 0 deletions feature/login/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ dependencies {
kapt(libs.hilt.compiler)
implementation(libs.hilt.android)

implementation(libs.orbit.core)
implementation(libs.orbit.compose)
implementation(libs.orbit.viewmodel)

implementation(libs.androidx.compose.navigation)
implementation(libs.hilt.navigation.compose)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import com.google.accompanist.pager.rememberPagerState
import com.kusitms.connectdog.core.designsystem.component.ConnectDogIconBottomButton
import com.kusitms.connectdog.core.designsystem.component.ConnectDogNormalButton
import com.kusitms.connectdog.core.designsystem.component.ConnectDogTextField
import com.kusitms.connectdog.core.designsystem.component.SpeechBubble
import com.kusitms.connectdog.core.designsystem.theme.ConnectDogTheme
import com.kusitms.connectdog.core.designsystem.theme.Gray2
import com.kusitms.connectdog.core.designsystem.theme.KAKAO
Expand Down Expand Up @@ -147,6 +148,25 @@ private fun LoginContent(
) {
val pagerState = rememberPagerState()
val coroutineScope = rememberCoroutineScope()

Row(
modifier = Modifier
.height(37.dp)
.fillMaxWidth(0.5f)
.padding(
start = if(pagerState.currentPage == 0) 0.dp else 10.dp,
end = if(pagerState.currentPage == 0) 10.dp else 0.dp
)
.align(if(pagerState.currentPage == 0) Alignment.End else Alignment.Start)
) {
SpeechBubble(
text = "이동봉사 공고 신청자를 모집한다면?",
fontSize = 10,
fontColor = PetOrange,
fontWeight = FontWeight.SemiBold
)
}

TabRow(
modifier = Modifier
.padding(start = 10.dp, end = 10.dp),
Expand Down Expand Up @@ -218,7 +238,6 @@ private fun Volunteer(
.fillMaxHeight()
.padding(top = 32.dp)
) {
BubbleInfo()
Spacer(modifier = Modifier.height(20.dp))
ConnectDogIconBottomButton(
iconId = R.drawable.ic_kakao,
Expand Down Expand Up @@ -334,82 +353,3 @@ private fun SignUpOrLogin(
)
}
}

@Composable
private fun BubbleInfo() {
Box {
BubbleShape()
Text(
modifier = Modifier.align(Alignment.Center),
text = "이동봉사 공고를 찾고 계신다면, 이동봉사자 회원으로!",
fontSize = 12.sp,
color = PetOrange,
fontWeight = FontWeight.SemiBold
)
}
}

@Composable
private fun BubbleShape() {
val density = LocalDensity.current
val tailWidth = with(density) { 10.dp.toPx() }
val tailHeight = with(density) { 9.dp.toPx() }
val strokeWidth = with(density) { 1.dp.toPx() }

Canvas(
modifier = Modifier
.height(28.dp)
.fillMaxWidth()
.padding(horizontal = 37.dp)
) {
val width = size.width
val height = size.height

val path = Path().apply {
val cornerRadius = 100.dp.toPx()
addRoundRect(RoundRect(0f, 0f, width, height, cornerRadius, cornerRadius))
}

val path2 = Path().apply {
val tailStartX = (width / 2) - (tailWidth / 2)
val tailStartY = height
moveTo(tailStartX + 2f, tailStartY)
lineTo(tailStartX + tailWidth - 2f, tailStartY)
}

val path3 = Path().apply {
val tailStartX = (width / 2) - (tailWidth / 2)
val tailStartY = height

moveTo(tailStartX, tailStartY)
lineTo(tailStartX + tailWidth / 2, tailStartY + tailHeight) // 꼬리의 끝점
lineTo(tailStartX + tailWidth, tailStartY)
}

drawPath(
path = path,
color = PetOrange,
style = Stroke(width = strokeWidth)
)

drawPath(
path = path2,
color = Color.White,
style = Stroke(width = strokeWidth + 2.dp.toPx())
)

drawPath(
path = path3,
color = PetOrange,
style = Stroke(width = strokeWidth)
)
}
}

@Preview
@Composable
private fun test() {
ConnectDogTheme {
BubbleInfo()
}
}
4 changes: 4 additions & 0 deletions feature/signup/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,8 @@ dependencies {
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.runtime.livedata)

implementation(libs.orbit.core)
implementation(libs.orbit.compose)
implementation(libs.orbit.viewmodel)
}
Loading

0 comments on commit ba51a98

Please sign in to comment.