|
@@ -49,6 +49,7 @@ import androidx.compose.material3.CircularProgressIndicator
|
|
|
import androidx.compose.material3.ElevatedButton
|
|
|
import androidx.compose.material3.Icon
|
|
|
import androidx.compose.material3.IconButton
|
|
|
+import androidx.compose.material3.MaterialTheme
|
|
|
import androidx.compose.material3.Text
|
|
|
import androidx.compose.material3.TextField
|
|
|
import androidx.compose.material3.TextFieldColors
|
|
@@ -99,6 +100,7 @@ import com.vpn.fastestvpnservice.beans.themesList
|
|
|
import com.vpn.fastestvpnservice.helpers.BasePreferenceHelper
|
|
|
import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.AddText
|
|
|
import com.vpn.fastestvpnservice.sealedClass.Screen
|
|
|
+import com.vpn.fastestvpnservice.ui.theme.outfitFontFamily
|
|
|
import com.vpn.fastestvpnservice.viewmodels.LoginViewModel
|
|
|
import kotlinx.coroutines.delay
|
|
|
import kotlin.coroutines.coroutineContext
|
|
@@ -165,14 +167,20 @@ fun Login(navHostController: NavHostController) {
|
|
|
Spacer(modifier = Modifier.height(50.dp))
|
|
|
|
|
|
TextMsg(
|
|
|
- fontSize = 28.sp,
|
|
|
text = "Welcome Back!",
|
|
|
- color = Color.White
|
|
|
+ color = Color.White,
|
|
|
+ style = MaterialTheme.typography.displayLarge
|
|
|
)
|
|
|
+ Spacer(modifier = Modifier.height(8.dp))
|
|
|
TextMsg(
|
|
|
- fontSize = 14.sp,
|
|
|
text = "Please login to your account.",
|
|
|
- color = colorResource(id = R.color.light_grey)
|
|
|
+ color = colorResource(id = R.color.light_grey),
|
|
|
+ style = TextStyle(
|
|
|
+ fontFamily = outfitFontFamily,
|
|
|
+ fontWeight = FontWeight.Normal,
|
|
|
+ fontSize = 14.sp,
|
|
|
+ lineHeight = 30.sp,
|
|
|
+ )
|
|
|
)
|
|
|
|
|
|
Spacer(modifier = Modifier.height(20.dp))
|
|
@@ -183,11 +191,13 @@ fun Login(navHostController: NavHostController) {
|
|
|
textChanged = it
|
|
|
},
|
|
|
readOnly = readOnly!!,
|
|
|
-
|
|
|
textStyle = TextStyle(
|
|
|
- fontSize = 20.sp,
|
|
|
color = colorResource(id = R.color.white),
|
|
|
-
|
|
|
+ fontFamily = outfitFontFamily,
|
|
|
+ fontWeight = FontWeight.Normal,
|
|
|
+ fontSize = 14.sp,
|
|
|
+ lineHeight = 22.sp,
|
|
|
+ letterSpacing = 0.21.sp
|
|
|
),
|
|
|
modifier = Modifier
|
|
|
.padding(start = 15.dp, end = 15.dp)
|
|
@@ -208,7 +218,10 @@ fun Login(navHostController: NavHostController) {
|
|
|
label = {
|
|
|
Text(text = "Email",
|
|
|
style = TextStyle(
|
|
|
- colorResource(id = R.color.white))
|
|
|
+ colorResource(id = R.color.white)),
|
|
|
+ fontFamily = outfitFontFamily,
|
|
|
+ fontWeight = FontWeight.Medium,
|
|
|
+ fontSize = 12.sp,
|
|
|
)
|
|
|
},
|
|
|
leadingIcon = {
|
|
@@ -254,9 +267,12 @@ fun Login(navHostController: NavHostController) {
|
|
|
readOnly = readOnly,
|
|
|
|
|
|
textStyle = TextStyle(
|
|
|
- fontSize = 20.sp,
|
|
|
color = colorResource(id = R.color.white),
|
|
|
-
|
|
|
+ fontFamily = outfitFontFamily,
|
|
|
+ fontWeight = FontWeight.Normal,
|
|
|
+ fontSize = 14.sp,
|
|
|
+ lineHeight = 22.sp,
|
|
|
+ letterSpacing = 0.21.sp
|
|
|
),
|
|
|
modifier = Modifier
|
|
|
.padding(start = 15.dp, end = 15.dp)
|
|
@@ -279,7 +295,10 @@ fun Login(navHostController: NavHostController) {
|
|
|
label = {
|
|
|
Text(text = "Password",
|
|
|
style = TextStyle(
|
|
|
- colorResource(id = R.color.white))
|
|
|
+ colorResource(id = R.color.white)),
|
|
|
+ fontFamily = outfitFontFamily,
|
|
|
+ fontWeight = FontWeight.Normal,
|
|
|
+ fontSize = 16.sp,
|
|
|
)
|
|
|
},
|
|
|
leadingIcon = {
|
|
@@ -349,7 +368,7 @@ fun Login(navHostController: NavHostController) {
|
|
|
}
|
|
|
)
|
|
|
|
|
|
- Spacer(modifier = Modifier.height(15.dp))
|
|
|
+ Spacer(modifier = Modifier.height(20.dp))
|
|
|
ClickableText(
|
|
|
onClick = {
|
|
|
if (!readOnly) {
|
|
@@ -362,7 +381,9 @@ fun Login(navHostController: NavHostController) {
|
|
|
.align(Alignment.End),
|
|
|
style = TextStyle(
|
|
|
fontSize = 16.sp,
|
|
|
+ fontFamily = outfitFontFamily,
|
|
|
fontWeight = FontWeight.Normal,
|
|
|
+ textAlign = TextAlign.Right,
|
|
|
color = colorResource(id = R.color.yellow_text),
|
|
|
),
|
|
|
text = AnnotatedString("Forgot Password"),
|
|
@@ -419,11 +440,15 @@ fun RowScope.TextMsgSignUp(
|
|
|
Text(
|
|
|
modifier = Modifier
|
|
|
.padding(0.dp),
|
|
|
- fontSize = 14.sp,
|
|
|
- fontWeight = FontWeight.Normal,
|
|
|
- fontStyle = FontStyle.Normal,
|
|
|
text = "Don't have an account? ",
|
|
|
- color = Color.White,
|
|
|
+ style = TextStyle(
|
|
|
+ color = Color.White,
|
|
|
+ fontSize = 14.sp,
|
|
|
+ fontFamily = outfitFontFamily,
|
|
|
+ fontWeight = FontWeight.Normal,
|
|
|
+ lineHeight = 30.sp,
|
|
|
+ textAlign = TextAlign.Right
|
|
|
+ ),
|
|
|
)
|
|
|
ClickableText(
|
|
|
onClick = {
|
|
@@ -434,9 +459,12 @@ fun RowScope.TextMsgSignUp(
|
|
|
modifier = Modifier
|
|
|
.padding(0.dp),
|
|
|
style = TextStyle(
|
|
|
- fontSize = 14.sp,
|
|
|
- fontStyle = FontStyle.Normal,
|
|
|
color = colorResource(id = R.color.yellow_text),
|
|
|
+ fontSize = 14.sp,
|
|
|
+ fontFamily = outfitFontFamily,
|
|
|
+ fontWeight = FontWeight.Normal,
|
|
|
+ lineHeight = 30.sp,
|
|
|
+ textAlign = TextAlign.Right
|
|
|
),
|
|
|
text = AnnotatedString(" Sign Up"),
|
|
|
)
|
|
@@ -515,9 +543,7 @@ fun BoxScope.SignInButton(
|
|
|
)
|
|
|
{
|
|
|
Text(text = "Sign In",
|
|
|
- fontSize = 18.sp,
|
|
|
- fontWeight = FontWeight.Medium,
|
|
|
- fontStyle = FontStyle.Normal
|
|
|
+ style = MaterialTheme.typography.titleMedium
|
|
|
)
|
|
|
|
|
|
val loginData by loginViewModel.liveDataUserResponse.observeAsState()
|
|
@@ -566,13 +592,16 @@ fun BoxScope.SignInButton(
|
|
|
}
|
|
|
|
|
|
@Composable
|
|
|
-fun ColumnScope.TextMsg(fontSize: TextUnit, text: String, color: Color) {
|
|
|
+fun ColumnScope.TextMsg(
|
|
|
+ text: String,
|
|
|
+ color: Color,
|
|
|
+ style: TextStyle
|
|
|
+) {
|
|
|
Text(
|
|
|
modifier = Modifier
|
|
|
.padding(start = 15.dp)
|
|
|
.align(Alignment.Start),
|
|
|
- fontSize = fontSize,
|
|
|
- fontWeight = FontWeight.Normal,
|
|
|
+ style = style,
|
|
|
text = text,
|
|
|
color = color,
|
|
|
)
|