feat: rename See more/less to Show/Hide Event and make JSON scrollable

The raw event JSON toggle in the signer consent dialog is now labeled
"Show Event" / "Hide Event" instead of the generic "See more" / "See less".
The expanded JSON block also gains horizontal scroll (softWrap=false +
horizontalScroll) so wide event JSON doesn't get clipped on narrow screens.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013hTFpoExYYLYEGGtXBx6ZT
This commit is contained in:
Claude
2026-06-28 15:57:52 +00:00
parent 3cc0ce09d4
commit f502b09b55
2 changed files with 18 additions and 13 deletions
@@ -23,7 +23,9 @@ package com.vitorpamplona.amethyst.napplet
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
@@ -194,15 +196,18 @@ private fun NappletSignerConsentDialog(
if (info.rawData.isNotBlank()) {
if (showRawData) {
Spacer(Modifier.height(8.dp))
SelectionContainer {
Text(
info.rawData,
style =
MaterialTheme.typography.labelSmall.copy(
fontFamily = FontFamily.Monospace,
),
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Box(modifier = Modifier.horizontalScroll(rememberScrollState())) {
SelectionContainer {
Text(
info.rawData,
style =
MaterialTheme.typography.labelSmall.copy(
fontFamily = FontFamily.Monospace,
),
color = MaterialTheme.colorScheme.onSurfaceVariant,
softWrap = false,
)
}
}
}
TextButton(
@@ -211,9 +216,9 @@ private fun NappletSignerConsentDialog(
) {
Text(
if (showRawData) {
stringResource(R.string.napplet_consent_see_less)
stringResource(R.string.napplet_consent_hide_event)
} else {
stringResource(R.string.napplet_consent_see_more)
stringResource(R.string.napplet_consent_show_event)
},
style = MaterialTheme.typography.labelSmall,
)
+2 -2
View File
@@ -769,8 +769,8 @@
<!-- Signer per-op consent dialog -->
<string name="napplet_consent_wants_to">wants to %1$s</string>
<string name="napplet_consent_see_more">See more</string>
<string name="napplet_consent_see_less">See less</string>
<string name="napplet_consent_show_event">Show Event</string>
<string name="napplet_consent_hide_event">Hide Event</string>
<string name="napplet_consent_more_options">More options</string>
<string name="napplet_consent_fewer_options">Fewer options</string>
<string name="napplet_signer_allow_once">Allow once</string>