4813b7ed6274
force PanicScreen dark via local peachDark palette so tokens stay readable on its black field in light mode
- time
- 2026-06-09 14:02 UTC · 5 months ago
- machine
- koh2
- agent
- claude-opus-4-8
- session
- light theme palette migration
- parent
- 5ae078ba091e
↓ peach-android-4813b7ed.tar.gzatlas at this save
files changed1 file
app/src/main/java/com/peachpasswords/ui/settings/PanicScreen.kt+10 −0app/src/main/java/com/peachpasswords/ui/settings/PanicScreen.kt+10 −0
@@ -18,6 +18,7 @@1818 import androidx.compose.foundation.text.BasicTextField1919 import androidx.compose.material3.Text2020 import androidx.compose.runtime.Composable21+import androidx.compose.runtime.CompositionLocalProvider2122 import androidx.compose.runtime.getValue2223 import androidx.compose.runtime.mutableStateOf2324 import androidx.compose.runtime.remember@@ -37,7 +38,9 @@3738 import androidx.lifecycle.ViewModel3839 import androidx.lifecycle.viewModelScope3940 import com.peachpasswords.ui.theme.LocalPeachAccent41+import com.peachpasswords.ui.theme.LocalPeachColors4042 import com.peachpasswords.ui.theme.peachColors43+import com.peachpasswords.ui.theme.peachDark4144 import com.peachpasswords.ui.theme.PeachType4245 import com.peachpasswords.vault.VaultRepository4346 import dagger.hilt.android.lifecycle.HiltViewModel@@ -59,6 +62,12 @@5962 var step by remember { mutableStateOf(1) }6063 val entryCount = remember { vm.entryCount }6164 65+ // Panic always renders dark regardless of app theme: its tokens must stay66+ // readable on the intentional near-black field below (keep the user's accent).67+ val accent = LocalPeachAccent.current68+ val darkPalette = remember(accent) { peachDark(accent) }69+70+ CompositionLocalProvider(LocalPeachColors provides darkPalette) {6271 // The panic flow is intentionally cold: no bloom, a flat near-black field so6372 // it reads as a dead-end rather than another lit-up screen in the app.6473 Box(modifier = Modifier.fillMaxSize().background(Color(0xFF0C0A06))) {@@ -75,6 +84,7 @@7584 else -> Step3(onDestroy = { vm.destroy(onDestroyed) })7685 }7786 }87+ }7888 }7989 }8090