62b76a063b8c
hide the secure reset panel once the device is on the settled generation
- time
- 2026-09-11 23:56 UTC · 2 months ago
- machine
- koh2
- agent
- deepseek/deepseek-v4-flash
- session
- sync screen polish
- parent
- dda21083ee07
↓ peach-android-62b76a06.tar.gzatlas at this save
files changed1 file
app/src/main/java/com/peachpasswords/ui/settings/SettingsCardBodies.kt+51 −45app/src/main/java/com/peachpasswords/ui/settings/SettingsCardBodies.kt+51 −45
@@ -1009,7 +1009,6 @@10091009 var showConnection by remember { mutableStateOf(false) }10101010 var showRecovery by remember { mutableStateOf(false) }10111011 1012- SubLabel("SECURE SYNC RESET", fg)10131012 val generation by syncVm.generationState.collectAsState()10141013 var resetOpen by remember { mutableStateOf(false) }10151014 var resetPassword by remember { mutableStateOf("") }@@ -1019,55 +1018,62 @@10191018 generation.state == RESET_REQUIRED ||10201019 generation.state == RESET_CONFIRMED10211020 1022- RowLine(fg) {1023- Column(Modifier.weight(1f)) {1024- Text(secureResetHeadline(generation.state), color = fg, fontFamily = PeachType.Body, fontSize = 13.sp)1025- Text(1026- secureResetDetail(generation.state),1027- color = fg.copy(alpha = 0.7f), fontFamily = PeachType.Body, fontSize = 11.sp, lineHeight = 16.sp,1028- modifier = Modifier.padding(top = 2.dp),1029- )1030- resetError?.let {1031- Text(it, color = peachColors.Breach, fontFamily = PeachType.Mono, fontSize = 10.sp, modifier = Modifier.padding(top = 2.dp))1021+ // §11: this panel is a migration call to action, not a permanent label. On1022+ // the settled new generation there is nothing left to do here, so it goes1023+ // away entirely — the Browser applies the same rule. The state and its1024+ // remember slots stay outside the branch so the composition stays stable.1025+ if (generation.state != V2_ACTIVE) {1026+ SubLabel("SECURE SYNC RESET", fg)1027+ RowLine(fg) {1028+ Column(Modifier.weight(1f)) {1029+ Text(secureResetHeadline(generation.state), color = fg, fontFamily = PeachType.Body, fontSize = 13.sp)1030+ Text(1031+ secureResetDetail(generation.state),1032+ color = fg.copy(alpha = 0.7f), fontFamily = PeachType.Body, fontSize = 11.sp, lineHeight = 16.sp,1033+ modifier = Modifier.padding(top = 2.dp),1034+ )1035+ resetError?.let {1036+ Text(it, color = peachColors.Breach, fontFamily = PeachType.Mono, fontSize = 10.sp, modifier = Modifier.padding(top = 2.dp))1037+ }10321038 }1033- }1034- if (resetOffered) {1035- SubtleButton("reset sync", fg) {1036- resetError = null1037- resetPassword = ""1038- resetOpen = true1039+ if (resetOffered) {1040+ SubtleButton("reset sync", fg) {1041+ resetError = null1042+ resetPassword = ""1043+ resetOpen = true1044+ }10391045 }10401046 }1041- }10421047 1043- if (resetOpen) {1044- AlertDialog(1045- onDismissRequest = { if (!resetting) resetOpen = false },1046- title = { Text("Reset Sync on this device?", color = fg, fontFamily = PeachType.Body) },1047- text = {1048- Column(verticalArrangement = Arrangement.spacedBy(PeachSpacing.sm)) {1049- Text(1050- SECURE_RESET_DISCLOSURE,1051- color = fg.copy(alpha = 0.8f), fontFamily = PeachType.Body, fontSize = 12.sp, lineHeight = 17.sp,1052- )1053- PwField("master password", resetPassword, fg) { resetPassword = it }1054- }1055- },1056- confirmButton = {1057- SubtleButton(if (resetting) "resetting..." else "reset", peachColors.Breach) {1058- if (!resetting) scope.launch {1059- resetting = true1060- resetError = syncVm.confirmReset(resetPassword)1061- resetPassword = ""1062- resetting = false1063- if (resetError == null) resetOpen = false1048+ if (resetOpen) {1049+ AlertDialog(1050+ onDismissRequest = { if (!resetting) resetOpen = false },1051+ title = { Text("Reset Sync on this device?", color = fg, fontFamily = PeachType.Body) },1052+ text = {1053+ Column(verticalArrangement = Arrangement.spacedBy(PeachSpacing.sm)) {1054+ Text(1055+ SECURE_RESET_DISCLOSURE,1056+ color = fg.copy(alpha = 0.8f), fontFamily = PeachType.Body, fontSize = 12.sp, lineHeight = 17.sp,1057+ )1058+ PwField("master password", resetPassword, fg) { resetPassword = it }10641059 }1065- }1066- },1067- dismissButton = {1068- SubtleButton("cancel", fg) { if (!resetting) resetOpen = false }1069- },1070- )1060+ },1061+ confirmButton = {1062+ SubtleButton(if (resetting) "resetting..." else "reset", peachColors.Breach) {1063+ if (!resetting) scope.launch {1064+ resetting = true1065+ resetError = syncVm.confirmReset(resetPassword)1066+ resetPassword = ""1067+ resetting = false1068+ if (resetError == null) resetOpen = false1069+ }1070+ }1071+ },1072+ dismissButton = {1073+ SubtleButton("cancel", fg) { if (!resetting) resetOpen = false }1074+ },1075+ )1076+ }10711077 }10721078 10731079 SubLabel("ADD A DEVICE", fg, top = 0.dp)