30233f7ca05d

migrate ui/components, ui/security, ui/screens, autofill call sites to peachColors

time
2026-06-09 13:39 UTC · 5 months ago
machine
koh2
agent
claude-opus-4-8
session
light theme palette migration
parent
517753d518ee
7 files app/src/main/java/com/peachpasswords/autofill/AutofillEntryPickerActivity.kt+7 −7app/src/main/java/com/peachpasswords/ui/components/CopyButton.kt+3 −3app/src/main/java/com/peachpasswords/ui/components/FaviconInitials.kt+2 −2app/src/main/java/com/peachpasswords/ui/components/LockRuneString.kt+2 −2app/src/main/java/com/peachpasswords/ui/components/TOTPRing.kt+5 −3app/src/main/java/com/peachpasswords/ui/screens/PlaceholderScreens.kt+3 −3app/src/main/java/com/peachpasswords/ui/security/StrengthBar.kt+4 −4
app/src/main/java/com/peachpasswords/autofill/AutofillEntryPickerActivity.kt+7 −7
@@ -38,7 +38,7 @@3838 import com.peachpasswords.ui.theme.ACCENT_COLORS3939 import com.peachpasswords.ui.theme.DEFAULT_ACCENT4040 import com.peachpasswords.ui.theme.LocalPeachAccent41-import com.peachpasswords.ui.theme.PeachColors41+import com.peachpasswords.ui.theme.peachColors4242 import com.peachpasswords.ui.theme.PeachTheme4343 import com.peachpasswords.ui.theme.PeachType4444 import com.peachpasswords.vault.VaultEntry@@ -81,7 +81,7 @@8181                 ModalBottomSheet(8282                     onDismissRequest = { cancel() },8383                     sheetState = sheetState,84-                    containerColor = PeachColors.S1,84+                    containerColor = peachColors.S1,8585                     dragHandle = { AccentDragHandle() },8686                 ) {8787                     PickerBody(@@ -161,7 +161,7 @@161161         )162162         Text(163163             text = if (origin.isNullOrBlank()) "your vault" else "Suggested for $origin",164-            color = PeachColors.T2,164+            color = peachColors.T2,165165             fontFamily = PeachType.Mono,166166             fontSize = 9.sp,167167             modifier = Modifier.padding(top = 2.dp, bottom = 14.dp),@@ -170,7 +170,7 @@170170         if (!unlocked) {171171             Text(172172                 text = "Peach is locked. Open the app to unlock, then return to this field.",173-                color = PeachColors.T1,173+                color = peachColors.T1,174174                 fontFamily = PeachType.Body,175175                 fontSize = 14.sp,176176                 modifier = Modifier.padding(bottom = 16.dp),@@ -188,7 +188,7 @@188188         } else if (entries.isEmpty()) {189189             Text(190190                 text = "No saved entries match this site.",191-                color = PeachColors.T1,191+                color = peachColors.T1,192192                 fontFamily = PeachType.Body,193193                 fontSize = 14.sp,194194             )@@ -215,7 +215,7 @@215215         Column(modifier = Modifier.padding(start = 12.dp)) {216216             Text(217217                 text = entry.title,218-                color = PeachColors.T0,218+                color = peachColors.T0,219219                 fontFamily = PeachType.Body,220220                 fontSize = 15.sp,221221                 maxLines = 1,@@ -225,7 +225,7 @@225225             if (sub.isNotBlank()) {226226                 Text(227227                     text = sub,228-                    color = PeachColors.T2,228+                    color = peachColors.T2,229229                     fontFamily = PeachType.Mono,230230                     fontSize = 11.sp,231231                     maxLines = 1,

view file

app/src/main/java/com/peachpasswords/ui/components/CopyButton.kt+3 −3
@@ -25,7 +25,7 @@2525 import androidx.compose.ui.unit.dp2626 import com.peachpasswords.ui.theme.LocalPeachAccent2727 import com.peachpasswords.ui.theme.LocalReduceMotion28-import com.peachpasswords.ui.theme.PeachColors28+import com.peachpasswords.ui.theme.peachColors2929 3030 /**3131  * Copy button with the two-effect copy feedback (spec §4.4): a diagonal sheen@@ -55,7 +55,7 @@5555         Modifier5656             .size(36.dp)5757             .clip(RoundedCornerShape(6.dp))58-            .background(PeachColors.S2)58+            .background(peachColors.S2)5959             .clickable(onClick = onCopy)6060             .drawBehind {6161                 if (animate && sheen < 1f) {@@ -83,7 +83,7 @@8383         Icon(8484             if (copied) Icons.Rounded.Check else Icons.Rounded.ContentCopy,8585             contentDescription = "copy",86-            tint = if (copied) accent else PeachColors.T1,86+            tint = if (copied) accent else peachColors.T1,8787             modifier = Modifier.size(15.dp),8888         )8989     }

view file

app/src/main/java/com/peachpasswords/ui/components/FaviconInitials.kt+2 −2
@@ -15,7 +15,7 @@1515 import androidx.compose.ui.unit.dp1616 import androidx.compose.ui.unit.em1717 import androidx.compose.ui.unit.sp18-import com.peachpasswords.ui.theme.PeachColors18+import com.peachpasswords.ui.theme.peachColors1919 import com.peachpasswords.ui.theme.PeachType2020 2121 /**@@ -40,7 +40,7 @@4040     ) {4141         Text(4242             text = titleInitials(source),43-            color = PeachColors.T0.copy(alpha = 0.92f),43+            color = peachColors.T0.copy(alpha = 0.92f),4444             fontFamily = PeachType.Mono,4545             fontWeight = FontWeight.SemiBold,4646             letterSpacing = 0.04.em,

view file

app/src/main/java/com/peachpasswords/ui/components/LockRuneString.kt+2 −2
@@ -15,7 +15,7 @@1515 import androidx.compose.ui.unit.sp1616 import com.peachpasswords.ui.theme.LocalPeachAccent1717 import com.peachpasswords.ui.theme.LocalReduceMotion18-import com.peachpasswords.ui.theme.PeachColors18+import com.peachpasswords.ui.theme.peachColors1919 import com.peachpasswords.ui.theme.PeachType2020 import kotlinx.coroutines.delay2121 import androidx.compose.runtime.LaunchedEffect@@ -52,7 +52,7 @@5252         runes.forEachIndexed { idx, ch ->5353             val glowing = idx == glowIdx5454             val color by animateColorAsState(55-                targetValue = if (glowing) accent else PeachColors.T0.copy(alpha = 0.12f),55+                targetValue = if (glowing) accent else peachColors.T0.copy(alpha = 0.12f),5656                 label = "rune-glow",5757             )5858             Text(

view file

app/src/main/java/com/peachpasswords/ui/components/TOTPRing.kt+5 −3
@@ -13,7 +13,7 @@1313 import androidx.compose.ui.unit.Dp1414 import androidx.compose.ui.unit.dp1515 import com.peachpasswords.ui.theme.LocalPeachAccent16-import com.peachpasswords.ui.theme.PeachColors16+import com.peachpasswords.ui.theme.peachColors1717 import com.peachpasswords.vault.TOTPGenerator1818 import kotlinx.coroutines.delay1919 @@ -28,14 +28,16 @@2828         while (true) { value = TOTPGenerator.periodProgress(); delay(100) }2929     }3030     val isHot = TOTPGenerator.remainingSeconds() <= 531+    val track = peachColors.T332+    val breach = peachColors.Breach3133 3234     Canvas(modifier = modifier.size(size)) {3335         val stroke = 2.dp.toPx()3436         val radius = (this.size.minDimension - stroke) / 2f3537         val center = Offset(this.size.width / 2f, this.size.height / 2f)36-        drawCircle(color = PeachColors.T3, radius = radius, style = Stroke(stroke))38+        drawCircle(color = track, radius = radius, style = Stroke(stroke))3739         drawArc(38-            color = if (isHot) PeachColors.Breach else accent,40+            color = if (isHot) breach else accent,3941             startAngle = -90f,4042             sweepAngle = 360f * progress,4143             useCenter = false,

view file

app/src/main/java/com/peachpasswords/ui/screens/PlaceholderScreens.kt+3 −3
@@ -23,7 +23,7 @@2323 import androidx.compose.ui.unit.sp2424 import com.peachpasswords.ui.PeachNav2525 import com.peachpasswords.ui.theme.LocalPeachAccent26-import com.peachpasswords.ui.theme.PeachColors26+import com.peachpasswords.ui.theme.peachColors2727 import com.peachpasswords.ui.theme.PeachType2828 import com.peachpasswords.ui.theme.ShellBackground2929 @@ -60,7 +60,7 @@6060             if (subtitle != null) {6161                 Text(6262                     text = subtitle,63-                    color = PeachColors.T1,63+                    color = peachColors.T1,6464                     fontFamily = PeachType.Mono,6565                     fontSize = 11.sp,6666                     textAlign = TextAlign.Center,@@ -95,7 +95,7 @@9595     ) {9696         Text(9797             text = label,98-            color = if (subtle) PeachColors.T1 else accent,98+            color = if (subtle) peachColors.T1 else accent,9999             fontFamily = PeachType.Mono,100100             fontSize = 13.sp,101101         )

view file

app/src/main/java/com/peachpasswords/ui/security/StrengthBar.kt+4 −4
@@ -13,7 +13,7 @@1313 import androidx.compose.ui.graphics.Color1414 import androidx.compose.ui.unit.dp1515 import com.peachpasswords.ui.theme.LocalPeachAccent16-import com.peachpasswords.ui.theme.PeachColors16+import com.peachpasswords.ui.theme.peachColors1717 1818 /**1919  * Amber for the mid-range ("weak"/"fair") fill. PeachColors has no amber token,@@ -30,9 +30,9 @@3030 fun strengthColor(score: Int): Color {3131     val accent = LocalPeachAccent.current3232     return when (score.coerceIn(0, 4)) {33-        0 -> PeachColors.Breach33+        0 -> peachColors.Breach3434         1, 2 -> StrengthAmber35-        3 -> PeachColors.HealthOk35+        3 -> peachColors.HealthOk3636         else -> accent3737     }3838 }@@ -62,7 +62,7 @@6262                     .height(4.dp)6363                     .padding(end = if (i < 3) 4.dp else 0.dp)6464                     .clip(RoundedCornerShape(2.dp))65-                    .background(if (i < lit) fill else PeachColors.T3),65+                    .background(if (i < lit) fill else peachColors.T3),6666             )6767         }6868     }

view file