fix(android): cosmetic cleanup — admin badge, AdminLanding subtitle, NowPlaying clip

Three small audit v3 cleanups bundled:

* Bug-6 / §4.19 — AdminLanding Users card subtitle was stale
  ("Manage accounts") even though Invites shipped weeks ago.
  Now: "Manage accounts and invites" to match Flutter.

* §4.22 — Account card never showed the admin badge. Flutter
  appends " · admin" next to the username when isAdmin. Threaded
  isAdmin through AccountCard and added the suffix.

* Bug-4 — NowPlayingBody used Column.Center with no scroll, so on
  small-portrait or any landscape phone the cover + scrubber +
  transport + actions row clip. Added verticalScroll so users on
  small screens can scroll the body instead of losing affordances.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-27 20:56:43 -04:00
parent 3239cb976d
commit cc6a8e2476
3 changed files with 15 additions and 4 deletions
@@ -177,7 +177,7 @@ private fun SectionList(counts: AdminCounts, navController: NavHostController) {
SectionCard(
icon = Lucide.Users,
title = "Users",
subtitle = "Manage accounts",
subtitle = "Manage accounts and invites",
count = counts.users,
onClick = { navController.navigate(AdminUsers) },
)
@@ -4,6 +4,8 @@ package com.fabledsword.minstrel.player.ui
import androidx.compose.animation.ExperimentalSharedTransitionApi
import androidx.compose.foundation.background
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
@@ -211,6 +213,7 @@ private fun NowPlayingBody(
modifier = Modifier
.fillMaxSize()
.padding(inner)
.verticalScroll(rememberScrollState())
.padding(horizontal = 24.dp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
@@ -93,7 +93,11 @@ fun SettingsScreen(
.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(16.dp),
) {
AccountCard(username = state.username, serverUrl = state.serverUrl)
AccountCard(
username = state.username,
isAdmin = state.isAdmin,
serverUrl = state.serverUrl,
)
NavTile(
icon = Lucide.ListMusic,
title = "My requests",
@@ -163,7 +167,7 @@ private fun NavTile(
}
@Composable
private fun AccountCard(username: String, serverUrl: String) {
private fun AccountCard(username: String, isAdmin: Boolean, serverUrl: String) {
ElevatedCard(modifier = Modifier.fillMaxWidth()) {
Column(
modifier = Modifier.padding(16.dp),
@@ -174,8 +178,12 @@ private fun AccountCard(username: String, serverUrl: String) {
style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onSurface,
)
val adminTag = if (isAdmin) " · admin" else ""
Text(
text = if (username.isEmpty()) "Signed in" else "Signed in as $username",
text = when {
username.isEmpty() -> "Signed in"
else -> "Signed in as $username$adminTag"
},
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)