|
@@ -3,6 +3,7 @@ package com.example.neurea.views.screens
|
|
import androidx.compose.foundation.background
|
|
import androidx.compose.foundation.background
|
|
import androidx.compose.foundation.border
|
|
import androidx.compose.foundation.border
|
|
import androidx.compose.foundation.layout.Arrangement
|
|
import androidx.compose.foundation.layout.Arrangement
|
|
|
|
+import androidx.compose.foundation.layout.Box
|
|
import androidx.compose.foundation.layout.Column
|
|
import androidx.compose.foundation.layout.Column
|
|
import androidx.compose.foundation.layout.PaddingValues
|
|
import androidx.compose.foundation.layout.PaddingValues
|
|
import androidx.compose.foundation.layout.Row
|
|
import androidx.compose.foundation.layout.Row
|
|
@@ -20,6 +21,8 @@ import androidx.compose.material3.HorizontalDivider
|
|
import androidx.compose.material3.Icon
|
|
import androidx.compose.material3.Icon
|
|
import androidx.compose.material3.IconButton
|
|
import androidx.compose.material3.IconButton
|
|
import androidx.compose.material3.MaterialTheme
|
|
import androidx.compose.material3.MaterialTheme
|
|
|
|
+import androidx.compose.material3.Switch
|
|
|
|
+import androidx.compose.material3.SwitchDefaults
|
|
import androidx.compose.material3.Text
|
|
import androidx.compose.material3.Text
|
|
import androidx.compose.material3.TextButton
|
|
import androidx.compose.material3.TextButton
|
|
import androidx.compose.material3.TextField
|
|
import androidx.compose.material3.TextField
|
|
@@ -64,12 +67,10 @@ fun SettingsScreen() { // navController: NavController
|
|
.padding(vertical = 80.dp))
|
|
.padding(vertical = 80.dp))
|
|
Column(
|
|
Column(
|
|
modifier = Modifier
|
|
modifier = Modifier
|
|
- .fillMaxSize()
|
|
|
|
.clip(RoundedCornerShape(45.dp, 45.dp))
|
|
.clip(RoundedCornerShape(45.dp, 45.dp))
|
|
.background(color = MaterialTheme.colorScheme.secondary)
|
|
.background(color = MaterialTheme.colorScheme.secondary)
|
|
){
|
|
){
|
|
Column(modifier = Modifier
|
|
Column(modifier = Modifier
|
|
- .fillMaxSize()
|
|
|
|
.padding(start = 40.dp, end = 40.dp, top = 25.dp)
|
|
.padding(start = 40.dp, end = 40.dp, top = 25.dp)
|
|
.clip(shape = RoundedCornerShape(22.dp))
|
|
.clip(shape = RoundedCornerShape(22.dp))
|
|
.border(
|
|
.border(
|
|
@@ -78,24 +79,107 @@ fun SettingsScreen() { // navController: NavController
|
|
shape = RoundedCornerShape(24.dp)
|
|
shape = RoundedCornerShape(24.dp)
|
|
)
|
|
)
|
|
.padding(15.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
|
|
|
|
|
|
+ Row(horizontalArrangement = Arrangement.SpaceAround, verticalAlignment = Alignment.CenterVertically){
|
|
|
|
+ Column(modifier = Modifier
|
|
|
|
+ .padding(0.dp, 0.dp, 5.dp, 0.dp)
|
|
|
|
+ .clip(RoundedCornerShape(6.dp))
|
|
|
|
+ ){
|
|
|
|
+ Column(modifier = Modifier
|
|
|
|
+ .background(MaterialTheme.colorScheme.primary)
|
|
|
|
+ .width(30.dp)
|
|
|
|
+ .height(30.dp)
|
|
|
|
+ , horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center
|
|
|
|
+ , ) {
|
|
|
|
+ Icon(painter = painterResource(id = R.drawable.baseline_visibility_24), "", tint = MaterialTheme.colorScheme.secondary, modifier = Modifier
|
|
|
|
|
|
- .height(25.dp)
|
|
|
|
- .width(25.dp)
|
|
|
|
|
|
+ .height(25.dp)
|
|
|
|
+ .width(25.dp)
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ Column(modifier = Modifier.width(190.dp)){
|
|
|
|
+ Text("Темная тема", fontWeight = FontWeight.Medium, fontSize = 14.sp)
|
|
|
|
+ Text("Сделать интерфейс приложения темным", fontWeight = FontWeight.Light, fontSize = 12.sp)
|
|
|
|
+ }
|
|
|
|
+ Column(){
|
|
|
|
+ var checked by remember { mutableStateOf(false) }
|
|
|
|
+ Switch(
|
|
|
|
+ checked = checked,
|
|
|
|
+ onCheckedChange = { checked = it },
|
|
|
|
+ modifier = Modifier.padding(10.dp),
|
|
|
|
+ colors = SwitchDefaults.colors(
|
|
|
|
+ checkedThumbColor = MaterialTheme.colorScheme.secondary,
|
|
|
|
+ checkedTrackColor = MaterialTheme.colorScheme.primary,
|
|
|
|
+ uncheckedThumbColor = MaterialTheme.colorScheme.secondary,
|
|
|
|
+ uncheckedTrackColor = MaterialTheme.colorScheme.onSecondary,
|
|
|
|
+ uncheckedBorderColor = Color.Transparent
|
|
|
|
+
|
|
)
|
|
)
|
|
|
|
+ )
|
|
}
|
|
}
|
|
|
|
|
|
- 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))
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Row(horizontalArrangement = Arrangement.SpaceAround, verticalAlignment = Alignment.CenterVertically){
|
|
|
|
+ Column(Modifier.width(245.dp)){
|
|
|
|
+ Text("Выйти из приложения", fontWeight = FontWeight.Medium, fontSize = 14.sp)
|
|
|
|
+ Text("По нажатию кнопки вы покинете аккаунт", fontWeight = FontWeight.Light, fontSize = 14.sp)
|
|
|
|
+ }
|
|
|
|
+ Column(modifier = Modifier
|
|
|
|
+ .padding(0.dp, 0.dp, 5.dp, 0.dp)
|
|
|
|
+ .clip(RoundedCornerShape(6.dp))
|
|
|
|
+ ){
|
|
|
|
+ Column(modifier = Modifier
|
|
|
|
+ .background(MaterialTheme.colorScheme.primary)
|
|
|
|
+ .width(30.dp)
|
|
|
|
+ .height(30.dp)
|
|
|
|
+ , horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center
|
|
|
|
+ , ) {
|
|
|
|
+ Icon(painter = painterResource(id = R.drawable.baseline_visibility_24), "", tint = MaterialTheme.colorScheme.secondary, modifier = Modifier
|
|
|
|
|
|
|
|
+ .height(25.dp)
|
|
|
|
+ .width(25.dp)
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
HorizontalDivider(color=MaterialTheme.colorScheme.onSecondary, thickness = 0.5.dp, modifier = Modifier.padding(start = 6.dp, end=6.dp, top = 8.dp, bottom = 17.dp))
|
|
HorizontalDivider(color=MaterialTheme.colorScheme.onSecondary, thickness = 0.5.dp, modifier = Modifier.padding(start = 6.dp, end=6.dp, top = 8.dp, bottom = 17.dp))
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Row(horizontalArrangement = Arrangement.SpaceAround, verticalAlignment = Alignment.CenterVertically){
|
|
|
|
+ Column(Modifier.width(245.dp)){
|
|
|
|
+ Text("Удалить аккаунт", fontWeight = FontWeight.Medium, fontSize = 14.sp)
|
|
|
|
+ Text("По нажатию кнопки вы удалите аккаунт", fontWeight = FontWeight.Light, fontSize = 14.sp)
|
|
|
|
+ }
|
|
|
|
+ Column(modifier = Modifier
|
|
|
|
+ .padding(0.dp, 0.dp, 5.dp, 0.dp)
|
|
|
|
+ .clip(RoundedCornerShape(6.dp))
|
|
|
|
+ ){
|
|
|
|
+ Column(modifier = Modifier
|
|
|
|
+ .background(Color(0xFFF15C5C))
|
|
|
|
+ .width(30.dp)
|
|
|
|
+ .height(30.dp),
|
|
|
|
+ horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center
|
|
|
|
+ , ) {
|
|
|
|
+ IconButton(onClick = { /*TODO*/ }) {
|
|
|
|
+ Icon(painter = painterResource(id = R.drawable.baseline_visibility_24), "", tint = MaterialTheme.colorScheme.secondary, modifier = Modifier
|
|
|
|
+
|
|
|
|
+ .height(25.dp)
|
|
|
|
+ .width(25.dp)
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|