810ffe368b4a
migrate ui/settings call sites to peachColors; force Settings stack dark via nested dark PeachTheme
- time
- 2026-06-09 13:40 UTC · 5 months ago
- machine
- koh2
- agent
- claude-opus-4-8
- session
- light theme palette migration
- parent
- 30233f7ca05d
↓ peach-android-810ffe36.tar.gzatlas at this save
files changed4 files
app/src/main/java/com/peachpasswords/ui/settings/PanicScreen.kt+13 −13app/src/main/java/com/peachpasswords/ui/settings/ProCelebration.kt+3 −3app/src/main/java/com/peachpasswords/ui/settings/SettingsCardBodies.kt+15 −15app/src/main/java/com/peachpasswords/ui/settings/SettingsScreen.kt+13 −4app/src/main/java/com/peachpasswords/ui/settings/PanicScreen.kt+13 −13
@@ -37,7 +37,7 @@3737 import androidx.lifecycle.ViewModel3838 import androidx.lifecycle.viewModelScope3939 import com.peachpasswords.ui.theme.LocalPeachAccent40-import com.peachpasswords.ui.theme.PeachColors40+import com.peachpasswords.ui.theme.peachColors4141 import com.peachpasswords.ui.theme.PeachType4242 import com.peachpasswords.vault.VaultRepository4343 import dagger.hilt.android.lifecycle.HiltViewModel@@ -80,16 +80,16 @@8080 8181 @Composable8282 private fun Step1(onCancel: () -> Unit, onContinue: () -> Unit) {83- Headline("destroy vault", 44.sp, PeachColors.Breach)83+ Headline("destroy vault", 44.sp, peachColors.Breach)8484 Spacer(Modifier.size(20.dp))8585 Text(8686 "This will permanently delete your vault and all saved passwords from this device. This cannot be undone.",87- color = PeachColors.T1,87+ color = peachColors.T1,8888 style = PeachType.body,8989 )9090 Spacer(Modifier.size(28.dp))9191 Row(modifier = Modifier.fillMaxWidth()) {92- GhostButton("Cancel", PeachColors.T1, onCancel)92+ GhostButton("Cancel", peachColors.T1, onCancel)9393 Spacer(Modifier.width(12.dp))9494 DangerButton("I understand, continue", enabled = true, onClick = onContinue)9595 }@@ -97,16 +97,16 @@9797 9898 @Composable9999 private fun Step2(entryCount: Int, onBack: () -> Unit, onContinue: () -> Unit) {100- Headline("are you sure?", 32.sp, PeachColors.Breach)100+ Headline("are you sure?", 32.sp, peachColors.Breach)101101 Spacer(Modifier.size(18.dp))102102 Text(103103 "You will lose access to all $entryCount saved passwords.",104- color = PeachColors.T1,104+ color = peachColors.T1,105105 style = PeachType.body,106106 )107107 Spacer(Modifier.size(28.dp))108108 Row(modifier = Modifier.fillMaxWidth()) {109- GhostButton("Go back", PeachColors.T1, onBack)109+ GhostButton("Go back", peachColors.T1, onBack)110110 Spacer(Modifier.width(12.dp))111111 DangerButton("Yes, destroy it", enabled = true, onClick = onContinue)112112 }@@ -118,7 +118,7 @@118118 val accent = LocalPeachAccent.current119119 val confirmed = typed.text == "DESTROY"120120 121- Headline("type DESTROY to confirm", 28.sp, PeachColors.T0)121+ Headline("type DESTROY to confirm", 28.sp, peachColors.T0)122122 Spacer(Modifier.size(22.dp))123123 BasicTextField(124124 value = typed,@@ -128,7 +128,7 @@128128 fontFamily = PeachType.Mono,129129 fontSize = 18.sp,130130 letterSpacing = 0.18.em,131- color = PeachColors.T0,131+ color = peachColors.T0,132132 ),133133 cursorBrush = SolidColor(accent),134134 modifier = Modifier.fillMaxWidth(),@@ -138,7 +138,7 @@138138 modifier = Modifier139139 .fillMaxWidth()140140 .size(1.dp)141- .background(PeachColors.T3),141+ .background(peachColors.T3),142142 )143143 Spacer(Modifier.size(28.dp))144144 DangerButton("Destroy vault", enabled = confirmed, onClick = onDestroy)@@ -176,14 +176,14 @@176176 Box(177177 modifier = Modifier178178 .clip(RoundedCornerShape(999.dp))179- .background(PeachColors.BreachBg.copy(alpha = PeachColors.BreachBg.alpha * alpha))180- .border(1.dp, PeachColors.Breach.copy(alpha = 0.55f * alpha), RoundedCornerShape(999.dp))179+ .background(peachColors.BreachBg.copy(alpha = peachColors.BreachBg.alpha * alpha))180+ .border(1.dp, peachColors.Breach.copy(alpha = 0.55f * alpha), RoundedCornerShape(999.dp))181181 .clickable(enabled = enabled, onClick = onClick)182182 .padding(horizontal = 18.dp, vertical = 11.dp),183183 ) {184184 Text(185185 label,186- color = PeachColors.Breach.copy(alpha = alpha),186+ color = peachColors.Breach.copy(alpha = alpha),187187 style = PeachType.sortPill.copy(fontSize = 11.sp),188188 )189189 }app/src/main/java/com/peachpasswords/ui/settings/ProCelebration.kt+3 −3
@@ -28,7 +28,7 @@2828 import com.peachpasswords.ui.components.PeachMark2929 import com.peachpasswords.ui.theme.LocalPeachAccent3030 import com.peachpasswords.ui.theme.LocalReduceMotion31-import com.peachpasswords.ui.theme.PeachColors31+import com.peachpasswords.ui.theme.peachColors3232 import com.peachpasswords.ui.theme.PeachType3333 import kotlinx.coroutines.delay3434 import kotlin.math.cos@@ -63,7 +63,7 @@6363 Box(6464 modifier = Modifier6565 .fillMaxSize()66- .background(PeachColors.Bg)66+ .background(peachColors.Bg)6767 .clickable(onClick = onDone),6868 contentAlignment = Alignment.Center,6969 ) {@@ -100,7 +100,7 @@100100 )101101 Text(102102 "thank you.",103- color = PeachColors.T1,103+ color = peachColors.T1,104104 style = TextStyle(fontFamily = PeachType.Display, fontStyle = FontStyle.Italic, fontSize = 26.sp),105105 textAlign = TextAlign.Center,106106 modifier = Modifier.padding(top = 6.dp),app/src/main/java/com/peachpasswords/ui/settings/SettingsCardBodies.kt+15 −15
@@ -31,7 +31,7 @@3131 import com.peachpasswords.feedback.FeedbackState3232 import com.peachpasswords.ui.theme.LocalPeachAccent3333 import com.peachpasswords.vault.DuressAction34-import com.peachpasswords.ui.theme.PeachColors34+import com.peachpasswords.ui.theme.peachColors3535 import androidx.compose.runtime.mutableStateOf3636 import androidx.compose.runtime.remember3737 import androidx.compose.runtime.rememberCoroutineScope@@ -256,7 +256,7 @@256256 if (bioError != null) {257257 Text(258258 bioError,259- color = com.peachpasswords.ui.theme.PeachColors.Breach,259+ color = com.peachpasswords.ui.theme.peachColors.Breach,260260 fontFamily = PeachType.Mono, fontSize = 10.sp,261261 modifier = Modifier.padding(start = 2.dp, top = 2.dp, bottom = 4.dp),262262 )@@ -397,12 +397,12 @@397397 }398398 if (advancedOpen) {399399 RowLine(fg) {400- Name("Replace vault from backup", com.peachpasswords.ui.theme.PeachColors.SyncBusy)401- SubtleButton("open", com.peachpasswords.ui.theme.PeachColors.SyncBusy) { onNavigate(PeachNav.Import) }400+ Name("Replace vault from backup", com.peachpasswords.ui.theme.peachColors.SyncBusy)401+ SubtleButton("open", com.peachpasswords.ui.theme.peachColors.SyncBusy) { onNavigate(PeachNav.Import) }402402 }403403 RowLine(fg) {404- Name("Destroy vault", com.peachpasswords.ui.theme.PeachColors.Breach)405- SubtleButton("destroy", com.peachpasswords.ui.theme.PeachColors.Breach) { onNavigate(PeachNav.Panic) }404+ Name("Destroy vault", com.peachpasswords.ui.theme.peachColors.Breach)405+ SubtleButton("destroy", com.peachpasswords.ui.theme.peachColors.Breach) { onNavigate(PeachNav.Panic) }406406 }407407 }408408 }@@ -536,7 +536,7 @@536536 )537537 }538538 if (activationError != null) {539- Text(activationError!!, color = com.peachpasswords.ui.theme.PeachColors.Breach, fontFamily = PeachType.Mono, fontSize = 10.sp, modifier = Modifier.padding(top = 6.dp))539+ Text(activationError!!, color = com.peachpasswords.ui.theme.peachColors.Breach, fontFamily = PeachType.Mono, fontSize = 10.sp, modifier = Modifier.padding(top = 6.dp))540540 }541541 Spacer(Modifier.height(8.dp))542542 Box(@@ -574,17 +574,17 @@574574 Text("%02d".format(i + 1), color = fg.copy(alpha = 0.5f), fontFamily = PeachType.Mono, fontSize = 10.sp, modifier = Modifier.padding(end = 10.dp))575575 Text(name, color = fg, fontFamily = PeachType.Body, fontSize = 13.sp)576576 }577- Text("unlocked", color = com.peachpasswords.ui.theme.PeachColors.HealthOk, fontFamily = PeachType.Display, fontStyle = FontStyle.Italic, fontSize = 11.sp)577+ Text("unlocked", color = com.peachpasswords.ui.theme.peachColors.HealthOk, fontFamily = PeachType.Display, fontStyle = FontStyle.Italic, fontSize = 11.sp)578578 }579579 }580580 Spacer(Modifier.height(12.dp))581581 Box(582582 Modifier.fillMaxWidth().clip(RoundedCornerShape(10.dp))583- .border(1.dp, com.peachpasswords.ui.theme.PeachColors.Breach.copy(alpha = 0.4f), RoundedCornerShape(10.dp))583+ .border(1.dp, com.peachpasswords.ui.theme.peachColors.Breach.copy(alpha = 0.4f), RoundedCornerShape(10.dp))584584 .clickable { vm.deactivate() }585585 .padding(vertical = 12.dp),586586 contentAlignment = Alignment.Center,587- ) { Text("Deactivate", color = com.peachpasswords.ui.theme.PeachColors.Breach, fontFamily = PeachType.Mono, fontSize = 12.sp) }587+ ) { Text("Deactivate", color = com.peachpasswords.ui.theme.peachColors.Breach, fontFamily = PeachType.Mono, fontSize = 12.sp) }588588 }589589 590590 /* ────────────────────────────── Feedback ───────────────────────────────── */@@ -664,7 +664,7 @@664664 Text(665665 err.message,666666 modifier = Modifier.padding(top = 8.dp),667- color = PeachColors.Breach,667+ color = peachColors.Breach,668668 fontFamily = PeachType.Mono,669669 fontSize = 11.sp,670670 lineHeight = 15.sp,@@ -686,7 +686,7 @@686686 private fun DuressActiveState(fg: Color, vm: SettingsViewModel) {687687 Text(688688 "Duress password is active",689- color = PeachColors.HealthOk,689+ color = peachColors.HealthOk,690690 fontFamily = PeachType.Mono,691691 fontSize = 11.sp,692692 modifier = Modifier.padding(top = 6.dp),@@ -736,7 +736,7 @@736736 DuressRadioOption("Show a decoy vault", action == DuressAction.DECOY, fg) { action = DuressAction.DECOY }737737 DuressRadioOption("Destroy the real vault", action == DuressAction.DESTROY, fg) { action = DuressAction.DESTROY }738738 739- error?.let { Text(it, color = PeachColors.Breach, fontFamily = PeachType.Mono, fontSize = 10.sp) }739+ error?.let { Text(it, color = peachColors.Breach, fontFamily = PeachType.Mono, fontSize = 10.sp) }740740 741741 val canSave = password.isNotBlank() && confirm.isNotBlank()742742 DuressSaveButton("Save duress password", fg, canSave) {@@ -796,11 +796,11 @@796796 private fun DuressDangerGhostButton(label: String, fg: Color, onClick: () -> Unit) {797797 Box(798798 Modifier.fillMaxWidth().clip(RoundedCornerShape(8.dp))799- .border(1.dp, PeachColors.Breach.copy(alpha = 0.5f), RoundedCornerShape(8.dp))799+ .border(1.dp, peachColors.Breach.copy(alpha = 0.5f), RoundedCornerShape(8.dp))800800 .clickable(onClick = onClick)801801 .padding(vertical = 11.dp),802802 contentAlignment = Alignment.Center,803803 ) {804- Text(label, color = PeachColors.Breach, fontFamily = PeachType.Mono, fontSize = 11.sp)804+ Text(label, color = peachColors.Breach, fontFamily = PeachType.Mono, fontSize = 11.sp)805805 }806806 }app/src/main/java/com/peachpasswords/ui/settings/SettingsScreen.kt+13 −4
@@ -57,9 +57,11 @@5757 import androidx.compose.ui.zIndex5858 import androidx.hilt.navigation.compose.hiltViewModel5959 import androidx.compose.material3.Text60+import com.peachpasswords.ui.theme.LocalPeachAccent6061 import com.peachpasswords.ui.theme.LocalReduceMotion61-import com.peachpasswords.ui.theme.PeachColors62+import com.peachpasswords.ui.theme.peachColors6263 import com.peachpasswords.ui.theme.PeachMotion64+import com.peachpasswords.ui.theme.PeachTheme6365 import com.peachpasswords.ui.theme.PeachStackColors6466 import com.peachpasswords.ui.theme.PeachType6567 import com.peachpasswords.ui.theme.ShellBackground@@ -85,6 +87,7 @@8587 val isPro by vm.isPro.collectAsState()8688 val showCelebration by vm.showCelebration.collectAsState()8789 val reduceMotion = LocalReduceMotion.current90+ val accent = LocalPeachAccent.current8891 val scope = rememberCoroutineScope()8992 9093 var active by remember { mutableStateOf(CardId.Pro) }@@ -118,6 +121,11 @@118121 }119122 }120123 124+ // The Settings stack always renders dark, regardless of the app theme125+ // (spec §5.5/§8): force a dark PeachTheme around it — this also darkens the126+ // ShellBackground base (which keys off MaterialTheme) — while keeping the127+ // user's chosen accent and reduce-motion preference.128+ PeachTheme(darkTheme = true, accent = accent, reduceMotion = reduceMotion) {121129 ShellBackground {122130 Column(Modifier.fillMaxSize().statusBarsPadding().padding(horizontal = 12.dp)) {123131 // Masthead: back chevron · "Settings" · card counter.@@ -131,19 +139,19 @@131139 .clickable { handleBack() },132140 contentAlignment = Alignment.Center,133141 ) {134- Text("‹", color = PeachColors.T1, fontFamily = PeachType.Mono, fontSize = 16.sp)142+ Text("‹", color = peachColors.T1, fontFamily = PeachType.Mono, fontSize = 16.sp)135143 }136144 Text(137145 "Settings",138146 modifier = Modifier.weight(1f).padding(start = 10.dp),139- color = PeachColors.T0,147+ color = peachColors.T0,140148 fontFamily = PeachType.Display,141149 fontStyle = FontStyle.Italic,142150 fontSize = 22.sp,143151 )144152 Text(145153 "${activeIndex + 1} / ${STACK_CARDS.size}",146- color = PeachColors.T2,154+ color = peachColors.T2,147155 fontFamily = PeachType.Mono,148156 fontSize = 9.sp,149157 letterSpacing = 0.22.em,@@ -253,6 +261,7 @@253261 if (showCelebration) {254262 ProCelebration(onDone = { vm.dismissCelebration(); celebrate() })255263 }264+ }256265 }257266 }258267