-
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 pull request #155 from Team-Ampersand/feature/152_publishing_home
🔀 :: (#151) - publishing sign up
- Loading branch information
Showing
9 changed files
with
672 additions
and
42 deletions.
There are no files selected for viewing
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
178 changes: 178 additions & 0 deletions
178
presentation/src/main/java/com/msg/presentation/view/signup/AuthenticationScreen.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,178 @@ | ||
package com.msg.presentation.view.signup | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.interaction.MutableInteractionSource | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
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.material.Text | ||
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.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.focus.onFocusChanged | ||
import androidx.compose.ui.text.style.TextAlign | ||
import androidx.compose.ui.unit.dp | ||
import com.dotori.dotori_components.components.button.DotoriButton | ||
import com.dotori.dotori_components.components.text_field.DotoriTextField | ||
import com.dotori.dotori_components.theme.ArrowLeft2Icon | ||
import com.dotori.dotori_components.theme.DotoriLogoIcon | ||
import com.dotori.dotori_components.theme.DotoriText | ||
import com.dotori.dotori_components.theme.DotoriTheme | ||
import com.dotori.dotori_components.theme.XMarkIcon | ||
import com.msg.presentation.view.signup.component.SignUpDatIndicator | ||
|
||
@Composable | ||
fun AuthenticationScreen( | ||
modifier: Modifier = Modifier, | ||
navigateToBack: () -> Unit, | ||
navigateToLogin: () -> Unit, | ||
navigateToPassword: () -> Unit | ||
) { | ||
var emailText by remember { mutableStateOf("") } | ||
var numberText by remember { mutableStateOf("") } | ||
var isEmailClicked by remember { mutableStateOf(false) } | ||
var isNumberClicked by remember { mutableStateOf(false) } | ||
|
||
Column( | ||
modifier = modifier | ||
.fillMaxSize() | ||
.background(DotoriTheme.colors.background) | ||
.padding(horizontal = 20.dp) | ||
) { | ||
Box(modifier = Modifier.padding(top = 16.dp)) { | ||
ArrowLeft2Icon( | ||
modifier = Modifier.clickable( | ||
interactionSource = remember { MutableInteractionSource() }, | ||
indication = null | ||
) { navigateToBack() }, | ||
contentDescription = "ArrowLeftIcon" | ||
) | ||
Text( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.padding(vertical = 2.dp), | ||
text = "회원가입", | ||
style = DotoriTheme.typography.subTitle2, | ||
color = DotoriTheme.colors.neutral10, | ||
textAlign = TextAlign.Center | ||
) | ||
} | ||
Row( | ||
modifier = Modifier.fillMaxWidth(), | ||
horizontalArrangement = Arrangement.SpaceBetween, | ||
verticalAlignment = Alignment.CenterVertically | ||
) { | ||
Row( | ||
modifier = Modifier | ||
.padding(top = 18.5.dp, bottom = 18.5.dp) | ||
.background(DotoriTheme.colors.background), | ||
horizontalArrangement = Arrangement.spacedBy(12.dp), | ||
verticalAlignment = Alignment.CenterVertically | ||
) { | ||
DotoriLogoIcon() | ||
DotoriText() | ||
} | ||
SignUpDatIndicator(index = 2) | ||
} | ||
Spacer(modifier = Modifier.height(8.dp)) | ||
Text( | ||
modifier = Modifier.fillMaxWidth(), | ||
text = "이메일", | ||
style = DotoriTheme.typography.smallTitle, | ||
color = DotoriTheme.colors.neutral10, | ||
textAlign = TextAlign.Start | ||
) | ||
Spacer(modifier = Modifier.height(8.dp)) | ||
Row(modifier = Modifier.fillMaxWidth()) { | ||
DotoriTextField( | ||
modifier = Modifier | ||
.weight(2f) | ||
.onFocusChanged { isEmailClicked = it.isFocused }, | ||
value = emailText, | ||
placeholder = "이메일", | ||
onValueChange = { emailText = it }, | ||
trailingIcon = { | ||
if (isEmailClicked && emailText.isNotBlank()) XMarkIcon( | ||
modifier = Modifier.clickable( | ||
interactionSource = remember { MutableInteractionSource() }, | ||
indication = null, | ||
onClick = { emailText = "" } | ||
) | ||
) | ||
} | ||
) | ||
DotoriButton( | ||
modifier = Modifier | ||
.weight(1f) | ||
.height(52.dp), | ||
text = "인증하기" | ||
) {} | ||
} | ||
Spacer(modifier = Modifier.height(24.dp)) | ||
Text( | ||
modifier = Modifier.fillMaxWidth(), | ||
text = "인증번호", | ||
style = DotoriTheme.typography.smallTitle, | ||
color = DotoriTheme.colors.neutral10, | ||
textAlign = TextAlign.Start | ||
) | ||
Spacer(modifier = Modifier.height(8.dp)) | ||
DotoriTextField( | ||
modifier = Modifier.onFocusChanged { isNumberClicked = it.isFocused }, | ||
value = numberText, | ||
placeholder = "인증번호", | ||
onValueChange = { numberText = it }, | ||
trailingIcon = { | ||
if (isNumberClicked && numberText.isNotBlank()) XMarkIcon( | ||
modifier = Modifier.clickable( | ||
interactionSource = remember { MutableInteractionSource() }, | ||
indication = null, | ||
onClick = { numberText = "" } | ||
) | ||
) | ||
} | ||
) | ||
Spacer(modifier = Modifier.height(24.dp)) | ||
DotoriButton( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.height(52.dp), | ||
text = "다음" | ||
) { | ||
navigateToPassword() | ||
} | ||
Spacer(modifier = Modifier.height(16.dp)) | ||
Row( | ||
modifier = Modifier.fillMaxWidth(), | ||
horizontalArrangement = Arrangement.Center | ||
) { | ||
Text( | ||
text = "이미 회원이라면? ", | ||
style = DotoriTheme.typography.body2, | ||
color = DotoriTheme.colors.neutral20, | ||
) | ||
Text( | ||
modifier = Modifier.clickable( | ||
interactionSource = remember { MutableInteractionSource() }, | ||
indication = null | ||
) { | ||
navigateToLogin() | ||
}, | ||
text = "로그인", | ||
style = DotoriTheme.typography.body2, | ||
color = DotoriTheme.colors.primary10, | ||
) | ||
} | ||
} | ||
} |
Oops, something went wrong.