add Caution about root app
This commit is contained in:
@@ -28,6 +28,7 @@ import androidx.compose.material.icons.filled.Check
|
|||||||
import androidx.compose.material.icons.filled.Close
|
import androidx.compose.material.icons.filled.Close
|
||||||
import androidx.compose.material.icons.filled.Notifications
|
import androidx.compose.material.icons.filled.Notifications
|
||||||
import androidx.compose.material.icons.filled.Security
|
import androidx.compose.material.icons.filled.Security
|
||||||
|
import androidx.compose.material.icons.filled.Warning
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.Card
|
import androidx.compose.material3.Card
|
||||||
import androidx.compose.material3.CardDefaults
|
import androidx.compose.material3.CardDefaults
|
||||||
@@ -69,15 +70,18 @@ fun SetupWizardScreen(
|
|||||||
0 -> WelcomeStep(
|
0 -> WelcomeStep(
|
||||||
onNext = { currentStep = 1 }
|
onNext = { currentStep = 1 }
|
||||||
)
|
)
|
||||||
1 -> RootAccessStep(
|
1 -> DisclaimerStep(
|
||||||
onNext = { currentStep = 2 },
|
onNext = { currentStep = 2 }
|
||||||
onSkip = { currentStep = 2 }
|
|
||||||
)
|
)
|
||||||
2 -> NotificationStep(
|
2 -> RootAccessStep(
|
||||||
onNext = { currentStep = 3 },
|
onNext = { currentStep = 3 },
|
||||||
onSkip = { currentStep = 3 }
|
onSkip = { currentStep = 3 }
|
||||||
)
|
)
|
||||||
3 -> CompleteStep(
|
3 -> NotificationStep(
|
||||||
|
onNext = { currentStep = 4 },
|
||||||
|
onSkip = { currentStep = 4 }
|
||||||
|
)
|
||||||
|
4 -> CompleteStep(
|
||||||
onFinish = onSetupComplete
|
onFinish = onSetupComplete
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -131,6 +135,53 @@ private fun WelcomeStep(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun DisclaimerStep(
|
||||||
|
onNext: () -> Unit
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
imageVector = Icons.Default.Warning,
|
||||||
|
contentDescription = null,
|
||||||
|
modifier = Modifier.size(64.dp),
|
||||||
|
tint = MaterialTheme.colorScheme.tertiary
|
||||||
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = "Before You Continue",
|
||||||
|
style = MaterialTheme.typography.headlineMedium,
|
||||||
|
fontWeight = FontWeight.Bold
|
||||||
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = "This app requires root access and performs system-level operations. While reasonable precautions have been taken, you are responsible for understanding what you're doing.",
|
||||||
|
style = MaterialTheme.typography.bodyLarge,
|
||||||
|
textAlign = TextAlign.Center,
|
||||||
|
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||||
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(12.dp))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = "Keep backups of important data. This software is provided \"as is\" without warranty.",
|
||||||
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
|
textAlign = TextAlign.Center,
|
||||||
|
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||||
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(48.dp))
|
||||||
|
|
||||||
|
Button(
|
||||||
|
onClick = onNext,
|
||||||
|
modifier = Modifier.fillMaxWidth()
|
||||||
|
) {
|
||||||
|
Text("Continue")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun RootAccessStep(
|
private fun RootAccessStep(
|
||||||
onNext: () -> Unit,
|
onNext: () -> Unit,
|
||||||
|
|||||||
Reference in New Issue
Block a user