浏览代码

frontend: компонент настроек

ZryachevTA 3 周之前
父节点
当前提交
0e9db4fb0e

+ 105 - 0
Frontend/app/src/main/java/com/example/neurea/views/screens/SettingsScreen.kt

@@ -0,0 +1,105 @@
+package com.example.neurea.views.screens
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.PaddingValues
+import androidx.compose.foundation.layout.Row
+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.foundation.text.KeyboardOptions
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
+import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.HorizontalDivider
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.material3.TextButton
+import androidx.compose.material3.TextField
+import androidx.compose.material3.TextFieldDefaults
+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.draw.clip
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.input.KeyboardType
+import androidx.compose.ui.text.input.PasswordVisualTransformation
+import androidx.compose.ui.text.input.VisualTransformation
+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 com.example.neurea.R
+import com.example.neurea.views.ui.theme.NeureaTheme
+
+@Preview()
+@OptIn(ExperimentalMaterial3Api::class)
+@Composable
+fun SettingsScreen() { // navController: NavController
+
+
+    NeureaTheme {
+        Column(
+            modifier = Modifier
+                .fillMaxSize()
+                .background(color = MaterialTheme.colorScheme.surface)
+        ) {
+            Text("Настройки приложения", color = MaterialTheme.colorScheme.primary, fontWeight = FontWeight.Bold, fontSize = 20.sp,
+                modifier = Modifier
+                    .align(Alignment.CenterHorizontally)
+                    .padding(vertical = 80.dp))
+            Column(
+                modifier = Modifier
+                    .fillMaxSize()
+                    .clip(RoundedCornerShape(45.dp, 45.dp))
+                    .background(color = MaterialTheme.colorScheme.secondary)
+            ){
+                Column(modifier = Modifier
+                    .fillMaxSize()
+                    .padding(start = 40.dp, end = 40.dp, top = 25.dp)
+                    .clip(shape = RoundedCornerShape(22.dp))
+                    .border(
+                        width = 2.dp,
+                        color = MaterialTheme.colorScheme.onSecondary,
+                        shape = RoundedCornerShape(24.dp)
+                    )
+                    .padding(15.dp),){
+                    Row(horizontalArrangement = Arrangement.SpaceAround){
+                        Column(modifier = Modifier.background(MaterialTheme.colorScheme.primary).width(30.dp).height(30.dp), verticalArrangement = Arrangement.Center) {
+                            Icon(painter = painterResource(id = R.drawable.baseline_visibility_24), "", tint = MaterialTheme.colorScheme.secondary, modifier = Modifier
+
+                                .height(25.dp)
+                                .width(25.dp)
+
+                                )
+                        }
+
+                    Column(){
+                        Text("Темная тема", fontWeight = FontWeight.Medium, fontSize = 14.sp)
+                        Text("Сделать интерфейс приложения темным", fontWeight = FontWeight.Light, fontSize = 14.sp)
+                    }
+
+                    }
+                    HorizontalDivider(color=MaterialTheme.colorScheme.onSecondary, thickness = 0.5.dp, modifier = Modifier.padding(start = 6.dp, end=6.dp, top = 8.dp, bottom = 17.dp))
+                }
+            }
+
+
+
+        }
+    }
+}

+ 1 - 1
Frontend/app/src/main/java/com/example/neurea/views/ui/theme/Color.kt

@@ -8,7 +8,7 @@ val PrimaryGreenLight = Color(0xFF00A693)
 val SecondaryWhiteLight = Color(0xFFFFFFFF)
 val SurfaceWhiteBlueLight = Color(0xFFF8F9FE)
 val TextPrimaryLight = Color(0xFF000000)
-val TextSecondaryLight = Color(0xFF8F9098)
+val TextSecondaryLight = Color(0xFFC5C6CC)
 
 
 // Темная тема