feat(backup): add 'Ask your partner to restore' entry to RecoveryScreen
This commit is contained in:
parent
f161fa49a5
commit
df9edc1daf
|
|
@ -51,6 +51,7 @@ import app.closer.ui.components.CloserGlyphs
|
|||
@Composable
|
||||
fun RecoveryScreen(
|
||||
onRecovered: () -> Unit,
|
||||
onPartnerRestore: () -> Unit = {},
|
||||
viewModel: RecoveryViewModel = hiltViewModel()
|
||||
) {
|
||||
val state by viewModel.uiState.collectAsState()
|
||||
|
|
@ -146,10 +147,24 @@ fun RecoveryScreen(
|
|||
}
|
||||
}
|
||||
|
||||
Spacer(Modifier.height(20.dp))
|
||||
Spacer(Modifier.height(16.dp))
|
||||
|
||||
androidx.compose.material3.TextButton(
|
||||
onClick = onPartnerRestore,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
Text(
|
||||
"No phrase? Ask your partner to restore this device",
|
||||
style = MaterialTheme.typography.labelLarge,
|
||||
color = SettingsPrimaryDeep,
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
}
|
||||
|
||||
Spacer(Modifier.height(12.dp))
|
||||
|
||||
Text(
|
||||
"Don't have your phrase? Ask your partner — they were shown the same one and can reveal it any time in Settings → Security.",
|
||||
"Your partner can restore your history for you — no phrase needed. They were also shown the same phrase and can reveal it any time in Settings → Security.",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = SettingsInk,
|
||||
textAlign = TextAlign.Center
|
||||
|
|
|
|||
Loading…
Reference in New Issue