|
@@ -1,6 +1,7 @@
|
|
package com.vpn.fastestvpnservice.screens
|
|
package com.vpn.fastestvpnservice.screens
|
|
|
|
|
|
import android.app.Activity
|
|
import android.app.Activity
|
|
|
|
+import android.content.Context
|
|
import android.content.Intent
|
|
import android.content.Intent
|
|
import android.content.res.Configuration
|
|
import android.content.res.Configuration
|
|
import android.location.Location
|
|
import android.location.Location
|
|
@@ -194,13 +195,13 @@ fun Login(navHostController: NavHostController) {
|
|
horizontalAlignment = Alignment.CenterHorizontally
|
|
horizontalAlignment = Alignment.CenterHorizontally
|
|
) {
|
|
) {
|
|
TextMsg(
|
|
TextMsg(
|
|
- text = "Welcome Back!",
|
|
|
|
|
|
+ text = context.getString(R.string.welcome_back),
|
|
color = Color.White,
|
|
color = Color.White,
|
|
style = MaterialTheme.typography.displayLarge
|
|
style = MaterialTheme.typography.displayLarge
|
|
)
|
|
)
|
|
Spacer(modifier = Modifier.height(8.dp))
|
|
Spacer(modifier = Modifier.height(8.dp))
|
|
TextMsg(
|
|
TextMsg(
|
|
- text = "Please login to your account.",
|
|
|
|
|
|
+ text = context.getString(R.string.please_login),
|
|
color = colorResource(id = R.color.white),
|
|
color = colorResource(id = R.color.white),
|
|
style = MaterialTheme.typography.customTypography.labelLarge,
|
|
style = MaterialTheme.typography.customTypography.labelLarge,
|
|
alpha = 0.6F
|
|
alpha = 0.6F
|
|
@@ -234,7 +235,7 @@ fun Login(navHostController: NavHostController) {
|
|
// color = colorResource(id = R.color.white))
|
|
// color = colorResource(id = R.color.white))
|
|
// },
|
|
// },
|
|
label = {
|
|
label = {
|
|
- Text(text = "Email",
|
|
|
|
|
|
+ Text(text = context.getString(R.string.email),
|
|
style = MaterialTheme.typography.customTypography.bodySmall
|
|
style = MaterialTheme.typography.customTypography.bodySmall
|
|
)
|
|
)
|
|
},
|
|
},
|
|
@@ -312,7 +313,7 @@ fun Login(navHostController: NavHostController) {
|
|
// color = colorResource(id = R.color.white))
|
|
// color = colorResource(id = R.color.white))
|
|
// },
|
|
// },
|
|
label = {
|
|
label = {
|
|
- Text(text = "Password",
|
|
|
|
|
|
+ Text(text = context.getString(R.string.password),
|
|
style = MaterialTheme.typography.customTypography.bodyLarge
|
|
style = MaterialTheme.typography.customTypography.bodyLarge
|
|
)
|
|
)
|
|
},
|
|
},
|
|
@@ -397,7 +398,7 @@ fun Login(navHostController: NavHostController) {
|
|
.padding(end = 15.dp)
|
|
.padding(end = 15.dp)
|
|
.align(Alignment.End),
|
|
.align(Alignment.End),
|
|
style = MaterialTheme.typography.customTypography.titleSmall,
|
|
style = MaterialTheme.typography.customTypography.titleSmall,
|
|
- text = AnnotatedString("Forgot Password"),
|
|
|
|
|
|
+ text = AnnotatedString(context.getString(R.string.forgot_pass)),
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -423,14 +424,15 @@ fun Login(navHostController: NavHostController) {
|
|
},
|
|
},
|
|
showErrorPass2,
|
|
showErrorPass2,
|
|
snackBarState,
|
|
snackBarState,
|
|
- snackBarStateRed
|
|
|
|
|
|
+ snackBarStateRed,
|
|
|
|
+ context
|
|
)
|
|
)
|
|
Row (
|
|
Row (
|
|
modifier = Modifier
|
|
modifier = Modifier
|
|
.padding(bottom = 25.dp)
|
|
.padding(bottom = 25.dp)
|
|
.align(Alignment.CenterHorizontally),
|
|
.align(Alignment.CenterHorizontally),
|
|
){
|
|
){
|
|
- TextMsgSignUp(navHostController = navHostController, loginViewModel, readOnly!!)
|
|
|
|
|
|
+ TextMsgSignUp(navHostController = navHostController, loginViewModel, readOnly!!, context)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -469,12 +471,13 @@ fun ColumnScope.ShowErrorRow(
|
|
fun RowScope.TextMsgSignUp(
|
|
fun RowScope.TextMsgSignUp(
|
|
navHostController: NavHostController,
|
|
navHostController: NavHostController,
|
|
loginViewModel: LoginViewModel,
|
|
loginViewModel: LoginViewModel,
|
|
- isEnabled: Boolean
|
|
|
|
|
|
+ isEnabled: Boolean,
|
|
|
|
+ context: Context
|
|
) {
|
|
) {
|
|
Text(
|
|
Text(
|
|
modifier = Modifier
|
|
modifier = Modifier
|
|
.padding(0.dp),
|
|
.padding(0.dp),
|
|
- text = "Don't have an account? ",
|
|
|
|
|
|
+ text = context.getString(R.string.dont_have_acc),
|
|
style = MaterialTheme.typography.customTypography.labelLarge,
|
|
style = MaterialTheme.typography.customTypography.labelLarge,
|
|
)
|
|
)
|
|
ClickableText(
|
|
ClickableText(
|
|
@@ -486,7 +489,7 @@ fun RowScope.TextMsgSignUp(
|
|
modifier = Modifier
|
|
modifier = Modifier
|
|
.padding(0.dp),
|
|
.padding(0.dp),
|
|
style = MaterialTheme.typography.customTypography.titleMedium,
|
|
style = MaterialTheme.typography.customTypography.titleMedium,
|
|
- text = AnnotatedString(" Sign Up"),
|
|
|
|
|
|
+ text = AnnotatedString(" ${context.getString(R.string.signup)}"),
|
|
)
|
|
)
|
|
|
|
|
|
}
|
|
}
|
|
@@ -506,7 +509,8 @@ fun ColumnScope.SignInButton(
|
|
showErrorPass2: (Boolean) -> Unit,
|
|
showErrorPass2: (Boolean) -> Unit,
|
|
isErrorPass2: Boolean,
|
|
isErrorPass2: Boolean,
|
|
snackBarState: SnackbarHostState,
|
|
snackBarState: SnackbarHostState,
|
|
- snackBarStateRed: SnackbarHostState
|
|
|
|
|
|
+ snackBarStateRed: SnackbarHostState,
|
|
|
|
+ context: Context
|
|
) {
|
|
) {
|
|
val scaffoldState = rememberScaffoldState()
|
|
val scaffoldState = rememberScaffoldState()
|
|
val coroutineScope = rememberCoroutineScope()
|
|
val coroutineScope = rememberCoroutineScope()
|
|
@@ -613,7 +617,7 @@ fun ColumnScope.SignInButton(
|
|
)
|
|
)
|
|
{
|
|
{
|
|
|
|
|
|
- Text(text = "Sign In",
|
|
|
|
|
|
+ Text(text = context.getString(R.string.signin),
|
|
style = MaterialTheme.typography.titleMedium,
|
|
style = MaterialTheme.typography.titleMedium,
|
|
textAlign = TextAlign.Center
|
|
textAlign = TextAlign.Center
|
|
)
|
|
)
|