Parcourir la source

app: upadate Layout all screens, add NewPassword screen

Bobarik41p il y a 1 semaine
Parent
commit
1e73827d80

+ 329 - 0
App/.idea/other.xml

@@ -0,0 +1,329 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="direct_access_persist.xml">
+    <option name="deviceSelectionList">
+      <list>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="27" />
+          <option name="brand" value="DOCOMO" />
+          <option name="codename" value="F01L" />
+          <option name="id" value="F01L" />
+          <option name="manufacturer" value="FUJITSU" />
+          <option name="name" value="F-01L" />
+          <option name="screenDensity" value="360" />
+          <option name="screenX" value="720" />
+          <option name="screenY" value="1280" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="28" />
+          <option name="brand" value="DOCOMO" />
+          <option name="codename" value="SH-01L" />
+          <option name="id" value="SH-01L" />
+          <option name="manufacturer" value="SHARP" />
+          <option name="name" value="AQUOS sense2 SH-01L" />
+          <option name="screenDensity" value="480" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2160" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="Lenovo" />
+          <option name="codename" value="TB370FU" />
+          <option name="id" value="TB370FU" />
+          <option name="manufacturer" value="Lenovo" />
+          <option name="name" value="Tab P12" />
+          <option name="screenDensity" value="340" />
+          <option name="screenX" value="1840" />
+          <option name="screenY" value="2944" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="31" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="a51" />
+          <option name="id" value="a51" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy A51" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="akita" />
+          <option name="id" value="akita" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 8a" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="b0q" />
+          <option name="id" value="b0q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy S22 Ultra" />
+          <option name="screenDensity" value="600" />
+          <option name="screenX" value="1440" />
+          <option name="screenY" value="3088" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="32" />
+          <option name="brand" value="google" />
+          <option name="codename" value="bluejay" />
+          <option name="id" value="bluejay" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 6a" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="caiman" />
+          <option name="id" value="caiman" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 9 Pro" />
+          <option name="screenDensity" value="360" />
+          <option name="screenX" value="960" />
+          <option name="screenY" value="2142" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="comet" />
+          <option name="id" value="comet" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 9 Pro Fold" />
+          <option name="screenDensity" value="390" />
+          <option name="screenX" value="2076" />
+          <option name="screenY" value="2152" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="29" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="crownqlteue" />
+          <option name="id" value="crownqlteue" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy Note9" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="2220" />
+          <option name="screenY" value="1080" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="dm3q" />
+          <option name="id" value="dm3q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy S23 Ultra" />
+          <option name="screenDensity" value="600" />
+          <option name="screenX" value="1440" />
+          <option name="screenY" value="3088" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="e1q" />
+          <option name="id" value="e1q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy S24" />
+          <option name="screenDensity" value="480" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2340" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="felix" />
+          <option name="id" value="felix" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Fold" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="2208" />
+          <option name="screenY" value="1840" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="felix" />
+          <option name="id" value="felix" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Fold" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="2208" />
+          <option name="screenY" value="1840" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="felix_camera" />
+          <option name="id" value="felix_camera" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Fold (Camera-enabled)" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="2208" />
+          <option name="screenY" value="1840" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="gts8uwifi" />
+          <option name="id" value="gts8uwifi" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy Tab S8 Ultra" />
+          <option name="screenDensity" value="320" />
+          <option name="screenX" value="1848" />
+          <option name="screenY" value="2960" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="husky" />
+          <option name="id" value="husky" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 8 Pro" />
+          <option name="screenDensity" value="390" />
+          <option name="screenX" value="1008" />
+          <option name="screenY" value="2244" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="30" />
+          <option name="brand" value="motorola" />
+          <option name="codename" value="java" />
+          <option name="id" value="java" />
+          <option name="manufacturer" value="Motorola" />
+          <option name="name" value="G20" />
+          <option name="screenDensity" value="280" />
+          <option name="screenX" value="720" />
+          <option name="screenY" value="1600" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="komodo" />
+          <option name="id" value="komodo" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 9 Pro XL" />
+          <option name="screenDensity" value="360" />
+          <option name="screenX" value="1008" />
+          <option name="screenY" value="2244" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="lynx" />
+          <option name="id" value="lynx" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 7a" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="31" />
+          <option name="brand" value="google" />
+          <option name="codename" value="oriole" />
+          <option name="id" value="oriole" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 6" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="panther" />
+          <option name="id" value="panther" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 7" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="q5q" />
+          <option name="id" value="q5q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="Galaxy Z Fold5" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1812" />
+          <option name="screenY" value="2176" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="samsung" />
+          <option name="codename" value="q6q" />
+          <option name="id" value="q6q" />
+          <option name="manufacturer" value="Samsung" />
+          <option name="name" value="SM-F956B" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1856" />
+          <option name="screenY" value="2160" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="30" />
+          <option name="brand" value="google" />
+          <option name="codename" value="r11" />
+          <option name="id" value="r11" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Watch" />
+          <option name="screenDensity" value="320" />
+          <option name="screenX" value="384" />
+          <option name="screenY" value="384" />
+          <option name="type" value="WEAR_OS" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="30" />
+          <option name="brand" value="google" />
+          <option name="codename" value="redfin" />
+          <option name="id" value="redfin" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 5" />
+          <option name="screenDensity" value="440" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2340" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="shiba" />
+          <option name="id" value="shiba" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 8" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2400" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="33" />
+          <option name="brand" value="google" />
+          <option name="codename" value="tangorpro" />
+          <option name="id" value="tangorpro" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel Tablet" />
+          <option name="screenDensity" value="320" />
+          <option name="screenX" value="1600" />
+          <option name="screenY" value="2560" />
+        </PersistentDeviceSelectionData>
+        <PersistentDeviceSelectionData>
+          <option name="api" value="34" />
+          <option name="brand" value="google" />
+          <option name="codename" value="tokay" />
+          <option name="id" value="tokay" />
+          <option name="manufacturer" value="Google" />
+          <option name="name" value="Pixel 9" />
+          <option name="screenDensity" value="420" />
+          <option name="screenX" value="1080" />
+          <option name="screenY" value="2424" />
+        </PersistentDeviceSelectionData>
+      </list>
+    </option>
+  </component>
+</project>

+ 150 - 0
App/app/src/main/java/com/example/mystictale/Screen/passwordRecovery/NewPassword.kt

@@ -0,0 +1,150 @@
+package com.example.mystictale.Screen.passwordRecovery
+
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.gestures.detectTapGestures
+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.foundation.layout.width
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonColors
+import androidx.compose.material3.LinearProgressIndicator
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.paint
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.StrokeCap
+import androidx.compose.ui.input.pointer.pointerInput
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.platform.LocalFocusManager
+import androidx.compose.ui.platform.LocalSoftwareKeyboardController
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.navigation.NavController
+import com.example.mystictale.R
+import com.example.mystictale.navigation.Screens
+import com.example.mystictale.resources.PasswordTextField
+import com.example.mystictale.ui.theme.DarkPurple
+import com.example.mystictale.ui.theme.Grey
+import com.example.mystictale.ui.theme.OpenSans
+
+@Composable
+fun NewPassword(navController: NavController) {
+    val focusManager = LocalFocusManager.current
+    val keyboardController = LocalSoftwareKeyboardController.current
+    val password = remember {
+        mutableStateOf("")
+    }
+    val repeatedPassword = remember {
+        mutableStateOf("")
+    }
+    Column(
+        Modifier
+            .fillMaxSize()
+            .paint(
+                painterResource(id = R.drawable.background),
+                contentScale = ContentScale.FillBounds
+            )
+            .pointerInput(Unit) {
+                detectTapGestures(onTap = {
+                    keyboardController?.hide()
+                    focusManager.clearFocus()
+                })
+            }
+            .padding(10.dp),
+        verticalArrangement = Arrangement.SpaceBetween,
+        horizontalAlignment = Alignment.CenterHorizontally
+    ) {
+
+        Column {
+            Box(
+                modifier = Modifier
+                    .padding(top = 30.dp)
+                    .height(40.dp)
+                    .fillMaxWidth(),
+                contentAlignment = Alignment.TopStart
+            ) {
+                Button(
+                    onClick = { navController.navigate(Screens.PasswordRecovery.route) },
+                    colors = ButtonColors(
+                        disabledContentColor = Color.White,
+                        disabledContainerColor = Color.Transparent,
+                        contentColor = Color.White,
+                        containerColor = Color.Transparent
+                    )
+                ) {
+                    Image(
+                        painter = painterResource(id = R.drawable.back),
+                        contentDescription = "back",
+                        modifier = Modifier
+                            .width(11.dp)
+                            .height(14.dp)
+                    )
+                }
+            }
+            Column(modifier = Modifier.padding(10.dp)) {
+                Spacer(modifier = Modifier.height(30.dp))
+                Text(
+                    text = "Придумайте новый пароль",
+                    fontWeight = FontWeight.Bold,
+                    fontFamily = OpenSans,
+                    fontSize = 24.sp,
+                    color = Color.White,
+                    modifier = Modifier
+                        .fillMaxWidth(0.9f)
+                        .padding(start = 30.dp),
+                    style = MaterialTheme.typography.headlineMedium
+                )
+                Spacer(modifier = Modifier.height(30.dp))
+
+                PasswordTextField(
+                    value = password.value,
+                    onValueChange = { password.value = it },
+                    placeholder = "Пароль"
+                )
+                Spacer(modifier = Modifier.height(30.dp))
+
+                PasswordTextField(
+                    value = repeatedPassword.value,
+                    onValueChange = { repeatedPassword.value = it },
+                    placeholder = "Повторный пароль"
+                )
+            }
+        }
+        Box(Modifier.padding(bottom = 50.dp)) {
+            Button(
+                onClick = { navController.navigate(Screens.RegistrationPassword.route) },
+                modifier = Modifier
+                    .width(310.dp)
+                    .height(48.dp),
+                shape = RoundedCornerShape(12.dp),
+                colors = ButtonColors(
+                    containerColor = DarkPurple,
+                    contentColor = Color.White,
+                    disabledContentColor = Color.White,
+                    disabledContainerColor = DarkPurple
+                )
+            ) {
+                Text("Далее", fontSize = 20.sp, fontWeight = FontWeight.Bold)
+
+            }
+
+        }
+
+
+    }
+}

+ 39 - 36
App/app/src/main/java/com/example/mystictale/Screen/passwordRecovery/PasswordRecovery.kt

@@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.width
 import androidx.compose.foundation.shape.RoundedCornerShape
 import androidx.compose.material3.Button
 import androidx.compose.material3.ButtonColors
-import androidx.compose.material3.LinearProgressIndicator
 import androidx.compose.material3.MaterialTheme
 import androidx.compose.material3.Text
 import androidx.compose.runtime.Composable
@@ -25,7 +24,6 @@ import androidx.compose.ui.Alignment
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.draw.paint
 import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.graphics.StrokeCap
 import androidx.compose.ui.input.pointer.pointerInput
 import androidx.compose.ui.layout.ContentScale
 import androidx.compose.ui.platform.LocalFocusManager
@@ -40,7 +38,6 @@ import com.example.mystictale.R
 import com.example.mystictale.navigation.Screens
 import com.example.mystictale.resources.GenericTextField
 import com.example.mystictale.ui.theme.DarkPurple
-import com.example.mystictale.ui.theme.Grey
 import com.example.mystictale.ui.theme.OpenSans
 
 @Composable
@@ -62,17 +59,19 @@ fun PasswordRecovery(navController: NavController) {
                     keyboardController?.hide()
                     focusManager.clearFocus()
                 })
-            }
-            .padding(10.dp),
+            },
         verticalArrangement = Arrangement.SpaceBetween,
         horizontalAlignment = Alignment.CenterHorizontally
     ) {
 
         Column {
-            Box(
+            Row(
                 modifier = Modifier
-                    .padding(top = 30.dp),
-                contentAlignment = Alignment.TopStart
+                    .padding(top = 30.dp)
+                    .height(40.dp)
+                    .fillMaxWidth(),
+                horizontalArrangement = Arrangement.Start,
+                verticalAlignment = Alignment.Top
             ) {
                 Button(
                     onClick = { navController.navigate(Screens.SingIn.route) },
@@ -92,41 +91,45 @@ fun PasswordRecovery(navController: NavController) {
                     )
                 }
             }
-            Spacer(modifier = Modifier.height(30.dp))
-            Text(
-                text = "Сброс пароля",
-                fontWeight = FontWeight.Bold,
-                fontFamily = OpenSans,
-                fontSize = 24.sp,
-                color = Color.White,
-                modifier = Modifier
-                    .fillMaxWidth(0.9f)
-                    .padding(horizontal = 20.dp),
-                style = MaterialTheme.typography.headlineMedium
-            )
-            Spacer(modifier = Modifier.height(30.dp))
+            Column(modifier = Modifier.padding(10.dp)) {
+                Spacer(modifier = Modifier.height(30.dp))
+                Text(
+                    text = "Сброс пароля",
+                    fontWeight = FontWeight.Bold,
+                    fontFamily = OpenSans,
+                    fontSize = 24.sp,
+                    color = Color.White,
+                    modifier = Modifier
+                        .fillMaxWidth(0.9f)
+                        .padding(start = 30.dp),
+                    style = MaterialTheme.typography.headlineMedium
+                )
+                Spacer(modifier = Modifier.height(30.dp))
+
+                Text(
+                    text = "Укажите свой адрес электронной почты, чтобы мы могли найти Ваш аккаунт",
+                    fontWeight = FontWeight.Light,
+                    fontFamily = OpenSans,
+                    fontSize = 15.sp,
+                    color = Color.White,
+                    modifier = Modifier
+                        .fillMaxWidth(0.9f)
+                        .padding(start = 30.dp)
+                )
+                Spacer(modifier = Modifier.height(30.dp))
 
-            Text(
-                text = "Укажите свой адрес электронной почты, чтобы мы могли найти Ваш аккаунт",
-                fontWeight = FontWeight.Light,
-                fontFamily = OpenSans,
-                fontSize = 13.sp,
-                color = Color.White,
-                modifier = Modifier
-                    .fillMaxWidth(0.9f)
-                    .padding(horizontal = 20.dp)
-            )
-            Spacer(modifier = Modifier.height(30.dp))
 
+                GenericTextField(email.value, { email.value = it }, "E-mail", KeyboardType.Email)
+
+            }
 
-            GenericTextField(email.value, { email.value = it }, "E-mail", KeyboardType.Email)
         }
 
-        Box(Modifier.padding(bottom = 40.dp)) {
+        Box(Modifier.padding(bottom = 50.dp)) {
             Button(
-                onClick = { navController.navigate(Screens.RegistrationPassword.route) },
+                onClick = { navController.navigate(Screens.NewPassword.route) },
                 modifier = Modifier
-                    .width(290.dp)
+                    .width(310.dp)
                     .height(48.dp),
                 shape = RoundedCornerShape(12.dp),
                 colors = ButtonColors(

+ 26 - 21
App/app/src/main/java/com/example/mystictale/Screen/registration/RegistrationDateOfBirth.kt

@@ -89,11 +89,14 @@ fun RegistrationDateOfBirth(navController: NavController) {
         Column {
             Box(
                 modifier = Modifier
-                    .padding(top = 30.dp),
+                    .padding(top = 30.dp)
+                    .height(40.dp)
+                    .fillMaxWidth(),
                 contentAlignment = Alignment.TopStart
             ) {
                 Button(
-                    onClick = {navController.navigate(Screens.RegistrationName.route) }, colors = ButtonColors(
+                    onClick = { navController.navigate(Screens.RegistrationName.route) },
+                    colors = ButtonColors(
                         disabledContentColor = Color.White,
                         disabledContainerColor = Color.Transparent,
                         contentColor = Color.White,
@@ -126,28 +129,30 @@ fun RegistrationDateOfBirth(navController: NavController) {
                     )
                 }
             }
-            Spacer(modifier = Modifier.height(30.dp))
-            Text(
-                text = "Ваша дата рождения",
-                fontWeight = FontWeight.Bold,
-                fontFamily = OpenSans,
-                fontSize = 24.sp,
-                color = Color.White,
-                modifier = Modifier
-                    .fillMaxWidth(0.9f)
-                    .padding(start = 35.dp),
-                style = MaterialTheme.typography.headlineMedium
-            )
-            Spacer(modifier = Modifier.height(30.dp))
+            Column(modifier = Modifier.padding(10.dp)) {
+                Spacer(modifier = Modifier.height(30.dp))
+                Text(
+                    text = "Ваша дата рождения",
+                    fontWeight = FontWeight.Bold,
+                    fontFamily = OpenSans,
+                    fontSize = 24.sp,
+                    color = Color.White,
+                    modifier = Modifier
+                        .fillMaxWidth(0.9f)
+                        .padding(start = 35.dp),
+                    style = MaterialTheme.typography.headlineMedium
+                )
+                Spacer(modifier = Modifier.height(30.dp))
 
-            DateOfBirthTextField(
-                dateOfBirth = dateOfBirth.value,
-                onValue = { dob -> dateOfBirth.value = dob.filter { it.isDigit() } },
-                dateDialogState = dateDialogState
-            )
+                DateOfBirthTextField(
+                    dateOfBirth = dateOfBirth.value,
+                    onValue = { dob -> dateOfBirth.value = dob.filter { it.isDigit() } },
+                    dateDialogState = dateDialogState
+                )
+            }
         }
 
-        Box(Modifier.padding(bottom = 40.dp)) {
+        Box(Modifier.padding(bottom = 50.dp)) {
             Button(
                 onClick = { navController.navigate(Screens.RegistrationGender.route) },
                 modifier = Modifier

+ 8 - 5
App/app/src/main/java/com/example/mystictale/Screen/registration/RegistrationEmail.kt

@@ -71,7 +71,9 @@ fun RegistrationEmail(navController: NavController) {
         Column {
             Box(
                 modifier = Modifier
-                    .padding(top = 30.dp),
+                    .padding(top = 30.dp)
+                    .height(40.dp)
+                    .fillMaxWidth(),
                 contentAlignment = Alignment.TopStart
             ) {
                 Button(
@@ -108,6 +110,7 @@ fun RegistrationEmail(navController: NavController) {
                     )
                 }
             }
+            Column(modifier = Modifier.padding(10.dp)) {
             Spacer(modifier = Modifier.height(30.dp))
             Text(
                 text = "Ваша электронная почта",
@@ -117,19 +120,19 @@ fun RegistrationEmail(navController: NavController) {
                 color = Color.White,
                 modifier = Modifier
                     .fillMaxWidth(0.9f)
-                    .padding(start = 35.dp),
+                    .padding(start = 30.dp),
                 style = MaterialTheme.typography.headlineMedium
             )
             Spacer(modifier = Modifier.height(30.dp))
 
             GenericTextField(email.value,{email.value = it},"E-mail",KeyboardType.Email)
         }
-
-        Box(Modifier.padding(bottom = 40.dp)){
+}
+        Box(Modifier.padding(bottom = 50.dp)){
             Button(
                 onClick = { navController.navigate(Screens.RegistrationPassword.route) },
                 modifier = Modifier
-                    .width(290.dp)
+                    .width(310.dp)
                     .height(48.dp),
                 shape = RoundedCornerShape(12.dp),
                 colors = ButtonColors(

+ 19 - 15
App/app/src/main/java/com/example/mystictale/Screen/registration/RegistrationGender.kt

@@ -52,7 +52,9 @@ fun RegistrationGender(navController: NavController) {
         Column {
             Box(
                 modifier = Modifier
-                    .padding(top = 30.dp),
+                    .padding(top = 30.dp)
+                    .height(40.dp)
+                    .fillMaxWidth(),
                 contentAlignment = Alignment.TopStart
             ) {
                 Button(
@@ -90,20 +92,22 @@ fun RegistrationGender(navController: NavController) {
                     )
                 }
             }
-            Spacer(modifier = Modifier.height(30.dp))
-            Text(
-                text = "Ваш пол",
-                fontWeight = FontWeight.Bold,
-                fontFamily = OpenSans,
-                fontSize = 24 .sp,
-                color = Color.White,
-                modifier = Modifier
-                    .fillMaxWidth(0.9f)
-                    .padding(horizontal = 35.dp),
-                style = MaterialTheme.typography.headlineMedium
-            )
-            Spacer(modifier = Modifier.height(30.dp))
-            ChooseGender()
+            Column(modifier = Modifier.padding(10.dp)) {
+                Spacer(modifier = Modifier.height(30.dp))
+                Text(
+                    text = "Ваш пол",
+                    fontWeight = FontWeight.Bold,
+                    fontFamily = OpenSans,
+                    fontSize = 24.sp,
+                    color = Color.White,
+                    modifier = Modifier
+                        .fillMaxWidth(0.9f)
+                        .padding(horizontal = 35.dp),
+                    style = MaterialTheme.typography.headlineMedium
+                )
+                Spacer(modifier = Modifier.height(30.dp))
+                ChooseGender()
+            }
         }
         Box(Modifier.padding(bottom = 40.dp)) {
             Button(

+ 33 - 18
App/app/src/main/java/com/example/mystictale/Screen/registration/RegistrationName.kt

@@ -1,6 +1,7 @@
 package com.example.mystictale.Screen.registration
 
 import androidx.compose.foundation.Image
+import androidx.compose.foundation.gestures.detectTapGestures
 import androidx.compose.foundation.layout.Arrangement
 import androidx.compose.foundation.layout.Box
 import androidx.compose.foundation.layout.Column
@@ -25,6 +26,7 @@ import androidx.compose.ui.Modifier
 import androidx.compose.ui.draw.paint
 import androidx.compose.ui.graphics.Color
 import androidx.compose.ui.graphics.StrokeCap
+import androidx.compose.ui.input.pointer.pointerInput
 import androidx.compose.ui.layout.ContentScale
 import androidx.compose.ui.platform.LocalFocusManager
 import androidx.compose.ui.platform.LocalSoftwareKeyboardController
@@ -55,6 +57,12 @@ fun RegistrationName(navController: NavController) {
                 painterResource(id = R.drawable.background),
                 contentScale = ContentScale.FillBounds
             )
+            .pointerInput(Unit) {
+                detectTapGestures(onTap = {
+                    keyboardController?.hide()
+                    focusManager.clearFocus()
+                })
+            }
             .padding(10.dp),
         verticalArrangement = Arrangement.SpaceBetween,
         horizontalAlignment = Alignment.CenterHorizontally
@@ -63,11 +71,14 @@ fun RegistrationName(navController: NavController) {
         Column {
             Box(
                 modifier = Modifier
-                    .padding(top = 30.dp),
+                    .padding(top = 30.dp)
+                    .height(40.dp)
+                    .fillMaxWidth(),
                 contentAlignment = Alignment.TopStart
             ) {
                 Button(
-                    onClick = { navController.navigate(Screens.RegistrationPassword.route) }, colors = ButtonColors(
+                    onClick = { navController.navigate(Screens.RegistrationPassword.route) },
+                    colors = ButtonColors(
                         disabledContentColor = Color.White,
                         disabledContainerColor = Color.Transparent,
                         contentColor = Color.White,
@@ -100,29 +111,33 @@ fun RegistrationName(navController: NavController) {
                     )
                 }
             }
-            Spacer(modifier = Modifier.height(30.dp))
-            Text(
-                text = "Как Вас зовут?",
-                fontWeight = FontWeight.Bold,
-                fontFamily = OpenSans,
-                fontSize = 24.sp,
-                color = Color.White,
-                modifier = Modifier
-                    .fillMaxWidth(0.9f)
-                    .padding(start = 35.dp),
-                style = MaterialTheme.typography.headlineMedium
-            )
-            Spacer(modifier = Modifier.height(30.dp))
+            Column(modifier = Modifier.padding(10.dp)) {
+                Spacer(modifier = Modifier.height(30.dp))
+
+                Text(
+                    text = "Как Вас зовут?",
+                    fontWeight = FontWeight.Bold,
+                    fontFamily = OpenSans,
+                    fontSize = 24.sp,
+                    color = Color.White,
+                    modifier = Modifier
+                        .fillMaxWidth(0.9f)
+                        .padding(start = 35.dp),
+                    style = MaterialTheme.typography.headlineMedium
+                )
+                Spacer(modifier = Modifier.height(30.dp))
 
-            GenericTextField(name.value, { name.value = it }, "Имя", KeyboardType.Text)
+                GenericTextField(name.value, { name.value = it }, "Имя", KeyboardType.Text)
+            }
         }
 
 
-        Box(Modifier.padding(bottom = 40.dp)) {
+
+        Box(Modifier.padding(bottom = 50.dp)) {
             Button(
                 onClick = { navController.navigate(Screens.RegistrationDateOfBirth.route) },
                 modifier = Modifier
-                    .width(290.dp)
+                    .width(310.dp)
                     .height(48.dp),
                 shape = RoundedCornerShape(12.dp),
                 colors = ButtonColors(

+ 43 - 38
App/app/src/main/java/com/example/mystictale/Screen/registration/RegistrationPassword.kt

@@ -73,11 +73,14 @@ fun RegistrationPassword(navController: NavController) {
         Column {
             Box(
                 modifier = Modifier
-                    .padding(top = 30.dp),
+                    .padding(top = 30.dp)
+                    .height(40.dp)
+                    .fillMaxWidth(),
                 contentAlignment = Alignment.TopStart
             ) {
                 Button(
-                    onClick = { navController.navigate(Screens.RegistrationEmail.route) }, colors = ButtonColors(
+                    onClick = { navController.navigate(Screens.RegistrationEmail.route) },
+                    colors = ButtonColors(
                         disabledContentColor = Color.White,
                         disabledContainerColor = Color.Transparent,
                         contentColor = Color.White,
@@ -110,53 +113,55 @@ fun RegistrationPassword(navController: NavController) {
                     )
                 }
             }
-            Spacer(modifier = Modifier.height(30.dp))
-            Text(
-                text = "Придумайте пароль",
-                fontWeight = FontWeight.Bold,
-                fontFamily = OpenSans,
-                fontSize = 24.sp,
-                color = Color.White,
-                modifier = Modifier
-                    .fillMaxWidth(0.9f)
-                    .padding(start = 35.dp),
-                style = MaterialTheme.typography.headlineMedium
-            )
-            Spacer(modifier = Modifier.height(30.dp))
-
-            Text(
-                text = "Пароль должен:\n" +
-                        "  ⚪ состоять не менее чем из 6 символов\n" +
-                        "  ⚪ содержать хотя бы одну букву\n" +
-                        "  ⚪ содержать хотя бы одну цифру", fontWeight = FontWeight.Light,
-                fontFamily = OpenSans,
-                fontSize = 13.sp,
-                color = Color.White,
-                modifier = Modifier
-                    .fillMaxWidth(0.9f)
-                    .padding(start = 40.dp)
-            )
+            Column(modifier = Modifier.padding(10.dp)) {
+                Spacer(modifier = Modifier.height(30.dp))
+                Text(
+                    text = "Придумайте пароль",
+                    fontWeight = FontWeight.Bold,
+                    fontFamily = OpenSans,
+                    fontSize = 24.sp,
+                    color = Color.White,
+                    modifier = Modifier
+                        .fillMaxWidth(0.9f)
+                        .padding(start = 35.dp),
+                    style = MaterialTheme.typography.headlineMedium
+                )
+                Spacer(modifier = Modifier.height(30.dp))
+
+                Text(
+                    text = "Пароль должен:\n" +
+                            "  ⚪ состоять не менее чем из 6 символов\n" +
+                            "  ⚪ содержать хотя бы одну букву\n" +
+                            "  ⚪ содержать хотя бы одну цифру", fontWeight = FontWeight.Light,
+                    fontFamily = OpenSans,
+                    fontSize = 13.sp,
+                    color = Color.White,
+                    modifier = Modifier
+                        .fillMaxWidth(0.9f)
+                        .padding(start = 40.dp)
+                )
 
 
-            Spacer(modifier = Modifier.height(30.dp))
+                Spacer(modifier = Modifier.height(30.dp))
 
-            PasswordTextField(password.value, { password.value = it }, "Пароль")
+                PasswordTextField(password.value, { password.value = it }, "Пароль")
 
-            Spacer(modifier = Modifier.height(30.dp))
+                Spacer(modifier = Modifier.height(30.dp))
 
-            PasswordTextField(
-                repeatedPassword.value,
-                { repeatedPassword.value = it },
-                "Повторный пароль"
-            )
+                PasswordTextField(
+                    repeatedPassword.value,
+                    { repeatedPassword.value = it },
+                    "Повторный пароль"
+                )
+            }
         }
 
 
-        Box(Modifier.padding(bottom = 40.dp)) {
+        Box(Modifier.padding(bottom = 50.dp)) {
             Button(
                 onClick = { navController.navigate(Screens.RegistrationName.route) },
                 modifier = Modifier
-                    .width(290.dp)
+                    .width(310.dp)
                     .height(48.dp),
                 shape = RoundedCornerShape(12.dp),
                 colors = ButtonColors(

+ 34 - 30
App/app/src/main/java/com/example/mystictale/Screen/signIn/SignIn.kt

@@ -76,7 +76,9 @@ fun SignIn(navController: NavController) {
         Column {
             Box(
                 modifier = Modifier
-                    .padding(top = 30.dp),
+                    .padding(top = 30.dp)
+                    .height(40.dp)
+                    .fillMaxWidth(),
                 contentAlignment = Alignment.TopStart
             ) {
                 Button(
@@ -97,41 +99,43 @@ fun SignIn(navController: NavController) {
                     )
                 }
             }
-            Spacer(modifier = Modifier.height(30.dp))
-            Text(
-                text = "Авторизация",
-                fontWeight = FontWeight.Bold,
-                fontFamily = OpenSans,
-                fontSize = 24.sp,
-                color = Color.White,
-                modifier = Modifier
-                    .fillMaxWidth(0.9f)
-                    .padding(start = 35.dp),
-                style = MaterialTheme.typography.headlineMedium
-            )
-            Spacer(modifier = Modifier.height(30.dp))
+            Column(modifier = Modifier.padding(10.dp)) {
+                Spacer(modifier = Modifier.height(30.dp))
+                Text(
+                    text = "Авторизация",
+                    fontWeight = FontWeight.Bold,
+                    fontFamily = OpenSans,
+                    fontSize = 24.sp,
+                    color = Color.White,
+                    modifier = Modifier
+                        .fillMaxWidth(0.9f)
+                        .padding(start = 35.dp),
+                    style = MaterialTheme.typography.headlineMedium
+                )
+                Spacer(modifier = Modifier.height(30.dp))
 
-            GenericTextField(email.value, { email.value = it }, "E-mail", KeyboardType.Email)
-            Spacer(modifier = Modifier.height(30.dp))
-            PasswordTextField(password.value, { password.value = it }, "Пароль")
-            Spacer(modifier = Modifier.height(30.dp))
-            Text(
-                "Забыли пароль?",
-                fontFamily = OpenSans,
-                fontSize = 13.sp,
-                fontWeight = FontWeight.Light,
-                color = Grey,
-                modifier = Modifier
-                    .padding(start = 35.dp)
-                    .clickable {navController.navigate(Screens.PasswordRecovery.route)   }
-            )
+                GenericTextField(email.value, { email.value = it }, "E-mail", KeyboardType.Email)
+                Spacer(modifier = Modifier.height(30.dp))
+                PasswordTextField(password.value, { password.value = it }, "Пароль")
+                Spacer(modifier = Modifier.height(30.dp))
+                Text(
+                    "Забыли пароль?",
+                    fontFamily = OpenSans,
+                    fontSize = 13.sp,
+                    fontWeight = FontWeight.Light,
+                    color = Grey,
+                    modifier = Modifier
+                        .padding(start = 35.dp)
+                        .clickable { navController.navigate(Screens.PasswordRecovery.route) }
+                )
+            }
         }
 
-        Box(Modifier.padding(bottom = 40.dp)) {
+        Box(Modifier.padding(bottom = 50.dp)) {
             Button(
                 onClick = {  },
                 modifier = Modifier
-                    .width(290.dp)
+                    .width(310.dp)
                     .height(48.dp),
                 shape = RoundedCornerShape(12.dp),
                 colors = ButtonColors(

+ 5 - 0
App/app/src/main/java/com/example/mystictale/navigation/Navigation.kt

@@ -12,6 +12,7 @@ import com.example.mystictale.Screen.registration.RegistrationGender
 import com.example.mystictale.Screen.registration.RegistrationName
 import com.example.mystictale.Screen.registration.RegistrationPassword
 import com.example.mystictale.Screen.Start
+import com.example.mystictale.Screen.passwordRecovery.NewPassword
 import com.example.mystictale.Screen.passwordRecovery.PasswordRecovery
 import com.example.mystictale.Screen.signIn.SignIn
 
@@ -53,6 +54,10 @@ fun Navigation() {
         {
             PasswordRecovery(navController)
         }
+        composable(Screens.NewPassword.route)
+        {
+            NewPassword(navController)
+        }
 
     }
 }

+ 1 - 0
App/app/src/main/java/com/example/mystictale/navigation/Screens.kt

@@ -9,5 +9,6 @@ sealed class Screens (val route:String){
     object RegistrationGender: Screens("gender")
     object SingIn: Screens("sign_in")
     object PasswordRecovery: Screens("password_recovery")
+    object NewPassword: Screens("new_password")
 
 }

+ 1 - 1
App/app/src/main/java/com/example/mystictale/resources/ChooseGender.kt

@@ -96,7 +96,7 @@ fun ChooseGender() {
                 .width(with(LocalDensity.current) { textFiledSize.width.toDp() })
                 .background(Color.White),
             offset = DpOffset(
-                x = 25.dp,
+                x = 43.dp,
                 y = 0.dp
             )
 

+ 3 - 2
App/app/src/main/java/com/example/mystictale/resources/DateOfBirthTextField.kt

@@ -4,6 +4,7 @@ import androidx.compose.foundation.clickable
 import androidx.compose.foundation.layout.fillMaxWidth
 import androidx.compose.foundation.layout.offset
 import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.width
 import androidx.compose.foundation.text.KeyboardOptions
 import androidx.compose.material.icons.Icons
 import androidx.compose.material.icons.filled.DateRange
@@ -29,8 +30,8 @@ fun DateOfBirthTextField(dateOfBirth:String,onValue:(String) -> Unit,dateDialogS
         value = dateOfBirth,
         onValueChange = onValue,
         Modifier
-            .fillMaxWidth(0.95f)
-            .padding(start = 35.dp),
+            .padding(start = 30.dp)
+            .width(310.dp),
         keyboardOptions = KeyboardOptions(
             keyboardType = KeyboardType.Number
         ),

+ 3 - 2
App/app/src/main/java/com/example/mystictale/resources/GenericTextField.kt

@@ -2,6 +2,7 @@ package com.example.mystictale.resources
 
 import androidx.compose.foundation.layout.fillMaxWidth
 import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.width
 import androidx.compose.foundation.text.KeyboardOptions
 import androidx.compose.material3.Text
 import androidx.compose.material3.TextField
@@ -22,8 +23,8 @@ fun GenericTextField(value:String, onValue:(String) -> Unit,placeholder:String,
         value = value,
         onValueChange = onValue,
         Modifier
-            .fillMaxWidth(0.95f)
-            .padding(horizontal = 20.dp),
+            .padding(start = 30.dp)
+            .width(310.dp),
         keyboardOptions = KeyboardOptions(
             keyboardType = keyboardType
         ),

+ 3 - 3
App/app/src/main/java/com/example/mystictale/resources/PasswordTextField.kt

@@ -33,8 +33,8 @@ fun PasswordTextField(value:String, onValueChange:(String)->Unit,placeholder: St
         value = value,
         onValueChange = onValueChange,
         Modifier
-            .fillMaxWidth(0.95f)
-            .padding(start = 35.dp),
+            .padding(start = 30.dp)
+            .width(310.dp),
         trailingIcon = {
             IconToggleButton(
                 checked = checked.value,
@@ -52,7 +52,7 @@ fun PasswordTextField(value:String, onValueChange:(String)->Unit,placeholder: St
             }
         },
         keyboardOptions = KeyboardOptions(
-            keyboardType = KeyboardType.NumberPassword
+            keyboardType = KeyboardType.Password
         ),
         visualTransformation = if (checked.value) VisualTransformation.None else PasswordVisualTransformation(),
         colors = TextFieldDefaults.colors(