style(cashu): make wallet settings danger zone red

Match the main Settings screen's danger styling: the "Danger Zone" header and
the Stop-nutzaps / Delete-wallet rows now use colorScheme.error for the header
text, row title, and leading icon. Reuses the shared R.string.danger_zone
instead of a duplicate cashu-specific string.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXRAunSJS2dBx7B79qTMew
This commit is contained in:
Claude
2026-06-17 22:32:02 +00:00
parent b08f904ff3
commit f3ac2b14d1
2 changed files with 8 additions and 3 deletions
@@ -58,6 +58,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
@@ -265,9 +266,10 @@ fun CashuWalletSettingsScreen(
item {
Spacer(modifier = Modifier.height(8.dp))
Text(
text = stringRes(R.string.cashu_settings_danger_zone),
text = stringRes(R.string.danger_zone),
style = MaterialTheme.typography.titleMedium,
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.error,
)
}
item {
@@ -275,6 +277,7 @@ fun CashuWalletSettingsScreen(
icon = MaterialSymbols.Block,
title = stringRes(R.string.cashu_settings_stop_nutzaps),
subtitle = stringRes(R.string.cashu_settings_stop_nutzaps_subtitle),
isDanger = true,
onClick = { showStopNutzapsConfirm = true },
)
}
@@ -283,6 +286,7 @@ fun CashuWalletSettingsScreen(
icon = MaterialSymbols.DeleteForever,
title = stringRes(R.string.cashu_settings_delete_wallet),
subtitle = stringRes(R.string.cashu_settings_delete_wallet_subtitle),
isDanger = true,
onClick = { showDeleteWalletConfirm = true },
)
}
@@ -374,6 +378,7 @@ private fun SettingsRow(
title: String,
subtitle: String?,
onClick: () -> Unit,
isDanger: Boolean = false,
) {
Card(
modifier =
@@ -391,7 +396,7 @@ private fun SettingsRow(
symbol = icon,
contentDescription = null,
modifier = Modifier.size(22.dp),
tint = MaterialTheme.colorScheme.primary,
tint = if (isDanger) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.primary,
)
Spacer(modifier = Modifier.width(14.dp))
Column(modifier = Modifier.weight(1f)) {
@@ -399,6 +404,7 @@ private fun SettingsRow(
text = title,
style = MaterialTheme.typography.bodyMedium,
fontWeight = FontWeight.Medium,
color = if (isDanger) MaterialTheme.colorScheme.error else Color.Unspecified,
)
if (subtitle != null) {
Text(
-1
View File
@@ -2239,7 +2239,6 @@
<string name="cashu_settings_restore_running">Scanning mints…</string>
<string name="cashu_settings_restore_nothing_found">No recoverable proofs found.</string>
<string name="cashu_settings_restore_result">Recovered %1$s sats across %2$s proofs.</string>
<string name="cashu_settings_danger_zone">Danger zone</string>
<string name="cashu_settings_stop_nutzaps">Stop receiving nutzaps</string>
<string name="cashu_settings_stop_nutzaps_subtitle">Withdraw your kind:10019 so others can no longer send you nutzaps. Your wallet and balance stay put.</string>
<string name="cashu_settings_stop_nutzaps_confirm_title">Stop receiving nutzaps?</string>