|
@@ -1,11 +1,9 @@
|
|
|
-package com.example.supabaserebuild.View
|
|
|
+package com.example.supabaserebuild.View.Components
|
|
|
|
|
|
import androidx.compose.foundation.layout.Arrangement
|
|
|
import androidx.compose.foundation.layout.Column
|
|
|
import androidx.compose.foundation.layout.padding
|
|
|
import androidx.compose.material3.Button
|
|
|
-import androidx.compose.material3.Icon
|
|
|
-import androidx.compose.material3.IconButton
|
|
|
import androidx.compose.material3.Text
|
|
|
import androidx.compose.material3.TextField
|
|
|
import androidx.compose.runtime.Composable
|
|
@@ -15,14 +13,12 @@ import androidx.compose.runtime.remember
|
|
|
import androidx.compose.runtime.setValue
|
|
|
import androidx.compose.ui.Alignment
|
|
|
import androidx.compose.ui.Modifier
|
|
|
-import androidx.compose.ui.res.painterResource
|
|
|
import androidx.compose.ui.text.TextStyle
|
|
|
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
|
|
import androidx.compose.ui.text.input.VisualTransformation
|
|
|
import androidx.compose.ui.tooling.preview.Preview
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
import androidx.compose.ui.unit.sp
|
|
|
-import com.example.supabaserebuild.R
|
|
|
import com.example.supabaserebuild.View.MainViewModel
|
|
|
|
|
|
@Preview
|
|
@@ -51,19 +47,6 @@ fun AuthScreen(viewModel: MainViewModel = MainViewModel()) {
|
|
|
onValueChange = { newText -> password.value = newText },
|
|
|
label = { Text("Password") },
|
|
|
visualTransformation = if (passwordVisibility) VisualTransformation.None else PasswordVisualTransformation(),
|
|
|
- leadingIcon = {
|
|
|
- IconButton(onClick = {
|
|
|
- passwordVisibility = !passwordVisibility
|
|
|
- }) {
|
|
|
- Icon(
|
|
|
- painter = painterResource(
|
|
|
- if (passwordVisibility) R.drawable.
|
|
|
- else R.drawable.
|
|
|
- ),
|
|
|
- contentDescription = null
|
|
|
- )
|
|
|
- }
|
|
|
- },
|
|
|
textStyle = TextStyle(fontSize = 18.sp),
|
|
|
modifier = Modifier.padding(bottom = 16.dp)
|
|
|
)
|