ui: cap the invite payload card and shorten the settings tab label

Two things the emulator run surfaced:

- The invite payload is about a kilobyte, so the plain Text card grew past the
  screen and pushed Copy invite / Done below the fold on a phone. Four lines
  with an ellipsis: the copy button carries the whole string, and the QR is the
  primary path anyway.
- "Node & Settings" as a 10sp label in a third of the bottom bar is one OEM font
  scale away from wrapping. The tab says "Settings"; the destination screen keeps
  its "Node & Settings" title.
This commit is contained in:
agent 2026-10-29 00:05:17 -04:00
commit b65c990014
No known key found for this signature in database
2 changed files with 11 additions and 1 deletions

View file

@ -33,6 +33,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.ClipEntry
import androidx.compose.ui.platform.LocalClipboard
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import com.siriusdevops.onionwire.R
import com.siriusdevops.onionwire.ui.components.Label
@ -114,11 +115,18 @@ fun ShareInviteScreen(ownerInvite: suspend () -> String, onBack: () -> Unit) {
OwQrCode(payload = payload, size = 220.dp)
}
Spacer(Modifier.height(16.dp))
// Four lines, ellipsised: the payload is ~1 KB, and a card
// that grows to fill the screen pushes Copy and Done out of
// reach — the copyable text is a fallback for the QR, not
// the main event. `Copy invite` always carries the whole
// string.
OwCard(Modifier.fillMaxWidth(), padding = 12.dp) {
Text(
payload,
style = MonoStyle.copy(color = OwColors.TextSecondary),
textAlign = TextAlign.Start,
maxLines = 4,
overflow = TextOverflow.Ellipsis,
)
}
Spacer(Modifier.height(12.dp))

View file

@ -43,7 +43,9 @@ import com.siriusdevops.onionwire.ui.OwSize
enum class OwTab(val label: String, @DrawableRes val icon: Int) {
Chats("Chats", R.drawable.ic_ow_chat),
Wallet("Wallet", R.drawable.ic_ow_wallet),
Settings("Node & Settings", R.drawable.ic_ow_sliders),
// Tab labels stay short: the destination is Node & Settings (that is the
// screen title), but a 10sp label in a third of the bar has no room for it.
Settings("Settings", R.drawable.ic_ow_sliders),
}
/**