feat(backup): add 'Ask your partner to restore' entry to RecoveryScreen

This commit is contained in:
null 2026-06-30 20:43:06 -05:00
parent f161fa49a5
commit df9edc1daf
1 changed files with 17 additions and 2 deletions

View File

@ -51,6 +51,7 @@ import app.closer.ui.components.CloserGlyphs
@Composable @Composable
fun RecoveryScreen( fun RecoveryScreen(
onRecovered: () -> Unit, onRecovered: () -> Unit,
onPartnerRestore: () -> Unit = {},
viewModel: RecoveryViewModel = hiltViewModel() viewModel: RecoveryViewModel = hiltViewModel()
) { ) {
val state by viewModel.uiState.collectAsState() 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( 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, style = MaterialTheme.typography.bodyMedium,
color = SettingsInk, color = SettingsInk,
textAlign = TextAlign.Center textAlign = TextAlign.Center