|
@@ -52,6 +52,8 @@ import androidx.compose.ui.viewinterop.AndroidView
|
|
|
import androidx.navigation.NavHostController
|
|
|
import androidx.navigation.compose.rememberNavController
|
|
|
import com.vpn.fastestvpnservice.R
|
|
|
+import com.vpn.fastestvpnservice.beans.isDarkTheme
|
|
|
+import com.vpn.fastestvpnservice.constants.AppConstant
|
|
|
import com.vpn.fastestvpnservice.constants.PrivacyPolicyDesc
|
|
|
import com.vpn.fastestvpnservice.constants.TermsAndConditionsDesc
|
|
|
import com.vpn.fastestvpnservice.sealedClass.BottomBarScreen
|
|
@@ -66,26 +68,25 @@ fun TermsAndConditions(
|
|
|
val configuration = LocalConfiguration.current
|
|
|
val screenHeight = configuration.screenHeightDp.dp
|
|
|
val screenWidth = configuration.screenWidthDp.dp
|
|
|
+ var showLoader by remember { mutableStateOf(true) }
|
|
|
|
|
|
Box(
|
|
|
modifier = Modifier
|
|
|
.fillMaxWidth()
|
|
|
- .background(
|
|
|
- colorResource(id = R.color.white)
|
|
|
- )
|
|
|
.fillMaxSize()
|
|
|
+ .background(MaterialTheme.colorScheme.onPrimary)
|
|
|
) {
|
|
|
- var showLoader by remember { mutableStateOf(true) }
|
|
|
|
|
|
ShowHeaderTnC(navHostController = navHostController, isFromSignUpScreen)
|
|
|
|
|
|
Box(modifier = Modifier
|
|
|
.padding(top = 60.dp)
|
|
|
.fillMaxSize()
|
|
|
- .background(Color.Transparent)
|
|
|
+ .background(MaterialTheme.colorScheme.onPrimary)
|
|
|
) {
|
|
|
+ val tncUrl = if (isDarkTheme.value) "${AppConstant.BASE_WEBVIEW_URL}terms-of-service?skin=dark"
|
|
|
+ else "${AppConstant.BASE_WEBVIEW_URL}terms-of-service?device=ios"
|
|
|
|
|
|
- val tncUrl = "https://fastestvpn.com/terms-of-service?device=ios"
|
|
|
AndroidView(factory = {
|
|
|
WebView(it).apply {
|
|
|
layoutParams = ViewGroup.LayoutParams(
|
|
@@ -117,23 +118,27 @@ fun TermsAndConditions(
|
|
|
it.loadUrl(tncUrl)
|
|
|
}
|
|
|
)
|
|
|
+ }
|
|
|
|
|
|
- if (showLoader) {
|
|
|
- var progress by remember { mutableFloatStateOf(0.1F) }
|
|
|
+ if (showLoader) {
|
|
|
+ var progress by remember { mutableFloatStateOf(0.1F) }
|
|
|
|
|
|
- LaunchedEffect(key1 = Unit) {
|
|
|
- for (i in 1..100) {
|
|
|
- progress = i.toFloat()/100F
|
|
|
- delay(25)
|
|
|
- }
|
|
|
+ LaunchedEffect(key1 = Unit) {
|
|
|
+ for (i in 1..100) {
|
|
|
+ progress = i.toFloat()/100F
|
|
|
+ delay(25)
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .fillMaxSize()
|
|
|
+ .background(MaterialTheme.colorScheme.onPrimary)) {
|
|
|
CircularProgressIndicator(
|
|
|
progress = progress,
|
|
|
modifier = Modifier
|
|
|
.align(Alignment.Center)
|
|
|
.size(50.dp),
|
|
|
- colorResource(id = R.color.dark_blue_gray_text),
|
|
|
+ colorResource(id = R.color.appYellow),
|
|
|
strokeWidth = 5.dp,
|
|
|
)
|
|
|
}
|
|
@@ -167,7 +172,7 @@ fun BoxScope.ShowHeaderTnC(
|
|
|
Icon(
|
|
|
painter = painterResource(id = R.drawable.backarrow3x),
|
|
|
contentDescription = "Arrow-Back",
|
|
|
- tint = colorResource(id = R.color.dark_blue_gray_text),
|
|
|
+ tint = MaterialTheme.colorScheme.primary,
|
|
|
modifier = Modifier.size(18.dp, 12.dp)
|
|
|
)
|
|
|
}
|
|
@@ -180,7 +185,7 @@ fun BoxScope.ShowHeaderTnC(
|
|
|
color = colorResource(id = R.color.transparent)
|
|
|
) {
|
|
|
Text(text = "Terms and Conditions",
|
|
|
- color = colorResource(id = R.color.dark_blue_gray_text),
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
style = MaterialTheme.typography.bodyMedium,
|
|
|
modifier = Modifier.fillMaxHeight()
|
|
|
|