diff --git a/presentation/src/main/java/com/nto/presentation/screens/loginScreen/LoginScreen.kt b/presentation/src/main/java/com/nto/presentation/screens/loginScreen/LoginScreen.kt index 4b93e24..ee56430 100644 --- a/presentation/src/main/java/com/nto/presentation/screens/loginScreen/LoginScreen.kt +++ b/presentation/src/main/java/com/nto/presentation/screens/loginScreen/LoginScreen.kt @@ -1,10 +1,35 @@ package com.nto.presentation.screens.loginScreen +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +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.foundation.layout.size +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp import androidx.hilt.navigation.compose.hiltViewModel import androidx.navigation.NavHostController +import androidx.navigation.compose.rememberNavController +import com.nto.presentation.R +import com.nto.presentation.theme.NTOTheme @Composable fun LoginScreen( @@ -14,5 +39,79 @@ fun LoginScreen( ) { val state = viewModel.state.collectAsState() + Column( + modifier = modifier.background(NTOTheme.colors.secondaryBackground), + horizontalAlignment = Alignment.CenterHorizontally + ) { + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { + Image( + painter = painterResource(R.drawable.elipse), + modifier = Modifier.size(140.dp), + contentScale = ContentScale.FillBounds, + contentDescription = null + ) + Image( + painter = painterResource(R.drawable.triangle), + modifier = Modifier.padding(vertical = 20.dp), + contentScale = ContentScale.FillBounds, + contentDescription = null + ) + } + Text( + text = "Вход", + style = NTOTheme.typography.titleLarge, + color = NTOTheme.colors.secondaryText, + textAlign = TextAlign.Center + ) + Spacer(modifier = Modifier.height(5.dp)) + Text( + text = stringResource(R.string.greeting_login), + style = NTOTheme.typography.displaySmall, + color = NTOTheme.colors.secondaryText, + textAlign = TextAlign.Center + ) + Spacer(modifier = Modifier.height(60.dp)) + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier + .fillMaxSize() + .clip( + RoundedCornerShape(topStart = 21.dp, topEnd = 21.dp) + ) + .background(NTOTheme.colors.primaryBackground) + .padding(40.dp) + ) { + Column(modifier = Modifier.fillMaxWidth()) { + Text( + stringResource(R.string.text_email), + style = NTOTheme.typography.displaySmall, + modifier = Modifier.padding(start = 10.dp), + fontSize = 14.sp + ) + Spacer(modifier = Modifier.height(5.dp)) + //TODO: InputField + } + Spacer(modifier = Modifier.height(20.dp)) + Column(modifier = Modifier.fillMaxWidth()) { + Text( + stringResource(R.string.text_password), + style = NTOTheme.typography.displaySmall, + modifier = Modifier.padding(start = 10.dp), + fontSize = 14.sp + ) + Spacer(modifier = Modifier.height(5.dp)) + //TODO: InputField + } + Spacer(Modifier.height(50.dp)) + //TODO: LoginButton + } + } +} +@Preview +@Composable +private fun LoginPreview() { + NTOTheme { + LoginScreen(rememberNavController(), Modifier.fillMaxSize()) + } } \ No newline at end of file diff --git a/presentation/src/main/res/drawable/elipse.xml b/presentation/src/main/res/drawable/elipse.xml new file mode 100644 index 0000000..53309c8 --- /dev/null +++ b/presentation/src/main/res/drawable/elipse.xml @@ -0,0 +1,11 @@ + + + diff --git a/presentation/src/main/res/drawable/eye_invisible.xml b/presentation/src/main/res/drawable/eye_invisible.xml new file mode 100644 index 0000000..954a9f2 --- /dev/null +++ b/presentation/src/main/res/drawable/eye_invisible.xml @@ -0,0 +1,9 @@ + + + diff --git a/presentation/src/main/res/drawable/eye_visible.xml b/presentation/src/main/res/drawable/eye_visible.xml new file mode 100644 index 0000000..cdccef5 --- /dev/null +++ b/presentation/src/main/res/drawable/eye_visible.xml @@ -0,0 +1,9 @@ + + + diff --git a/presentation/src/main/res/drawable/triangle.xml b/presentation/src/main/res/drawable/triangle.xml new file mode 100644 index 0000000..567a78f --- /dev/null +++ b/presentation/src/main/res/drawable/triangle.xml @@ -0,0 +1,11 @@ + + + diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index ed23d76..b720adb 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -1,4 +1,7 @@ presentation Войти + Почта + Пароль + Войдите в свой аккаунт чтобы продолжить \ No newline at end of file