feat(android): restyle the app after the web client
android / debug (push) Successful in 2m21s
ci / checks (push) Successful in 3m19s
ci / test (push) Successful in 1m17s
ci / chart (push) Successful in 6s
android / release (push) Successful in 2m19s
ci / docker (push) Successful in 2m2s
ci / web (push) Successful in 15s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m9s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 28s
ci / publish-edge-chart (push) Successful in 4s
android / debug (push) Successful in 2m21s
ci / checks (push) Successful in 3m19s
ci / test (push) Successful in 1m17s
ci / chart (push) Successful in 6s
android / release (push) Successful in 2m19s
ci / docker (push) Successful in 2m2s
ci / web (push) Successful in 15s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m9s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 28s
ci / publish-edge-chart (push) Successful in 4s
The phone still wore the old dark-shell language while the web client had moved to the warmer, quieter one: purple-tinted neutrals, neon jade on near-black, state drawn as colored pills and chips, cards floating on drop shadows. The two surfaces of one claw no longer read as one product. Theme.kt now carries the web palette as a RhemaColors bundle of tokens (warm paper in light, near-black with a mint accent in dark), picked from the OS dark mode, with a matching splash and status bars. Hairline borders replace shadows; corners settle at 12dp with pill buttons. Components.kt redoes the shared voice: RhemaCard with its header divider, AppCallout with the colored left bar, StatusWord as a bare tinted word, RhemaTag as a quiet mono badge, and RhemaButton, RhemaField, and RhemaSelect as strong-border outlines with mono timestamps. ChatScreen renders the transcript the way the web does: left-aligned user rows with small circular initial avatars, agent turns as surface cards with the jade left bar and the outcome word, deltas folded into the turn instead of separate tool and thinking cards, a Working row while a turn streams. Sessions, Diagnostics, Settings, and Devices follow: state words instead of chips, faint section labels, quiet nav rows. assembleDebug passes; the app was exercised against the mock claw on an API 36 emulator in light and OS-forced dark.
This commit is contained in:
1 parent
49e323987c
commit
ec52ae90b2
15 files changed
+624
-508
No files matched your search
@@ -37,7 +37,7 @@
|
||||
android:icon="@drawable/ic_rhema"
|
||||
android:label="@string/app_name"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:theme="@android:style/Theme.Material.NoActionBar">
|
||||
android:theme="@style/Theme.Rhema">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
@@ -25,10 +25,12 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.toArgb
|
||||
import android.content.res.Configuration
|
||||
import rs.rhema.phone.di.AppContainer
|
||||
import rs.rhema.phone.ui.ChatScreen
|
||||
import rs.rhema.phone.ui.JadeiteGround
|
||||
import rs.rhema.phone.ui.RhemaTheme
|
||||
import rs.rhema.phone.ui.TogetherGroundDark
|
||||
import rs.rhema.phone.ui.TogetherGroundLight
|
||||
import rs.rhema.phone.ui.SessionsScreen
|
||||
import rs.rhema.phone.ui.SettingsScreen
|
||||
import rs.rhema.phone.work.enqueuePhoneCommandsNow
|
||||
@@ -43,9 +45,16 @@ class MainActivity : ComponentActivity() {
|
||||
registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions()) { }
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// Edge-to-edge with the design's dark ground behind the system
|
||||
// bars; the theme draws under them, the root pads them out.
|
||||
enableEdgeToEdge(SystemBarStyle.dark(JadeiteGround.toArgb()))
|
||||
// Edge-to-edge with the design's ground behind the system bars,
|
||||
// light or dark as the OS currently asks; the theme draws under
|
||||
// them, the root pads them out.
|
||||
val dark =
|
||||
(resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) ==
|
||||
Configuration.UI_MODE_NIGHT_YES
|
||||
val ground = (if (dark) TogetherGroundDark else TogetherGroundLight).toArgb()
|
||||
enableEdgeToEdge(
|
||||
if (dark) SystemBarStyle.dark(ground) else SystemBarStyle.light(ground, ground),
|
||||
)
|
||||
super.onCreate(savedInstanceState)
|
||||
// POST_NOTIFICATIONS is a runtime permission on API 33+. Asking every
|
||||
// cold start is deliberate; the OS throttles repeated denials itself.
|
||||
|
||||
@@ -33,6 +33,7 @@ import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||
import androidx.compose.material.icons.automirrored.filled.Send
|
||||
@@ -40,6 +41,7 @@ import androidx.compose.material.icons.filled.Add
|
||||
import androidx.compose.material.icons.filled.Close
|
||||
import androidx.compose.material3.AlertDialog
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.material3.HorizontalDivider
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
@@ -68,9 +70,9 @@ import androidx.compose.ui.graphics.asImageBitmap
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.core.content.FileProvider
|
||||
@@ -176,7 +178,7 @@ fun ChatScreen(container: AppContainer, sessionKey: String, onBack: () -> Unit)
|
||||
|
||||
Column(modifier = Modifier.fillMaxSize()) {
|
||||
ChatHeader(sessionKey, controller.connection, face, onBack)
|
||||
HorizontalDivider(color = JadeiteBorder)
|
||||
HorizontalDivider(color = TogetherBorder)
|
||||
|
||||
// Reversed layout: index 0 is the newest turn, pinned to the
|
||||
// bottom edge. A streaming reply grows against that anchor, so
|
||||
@@ -216,9 +218,9 @@ fun ChatScreen(container: AppContainer, sessionKey: String, onBack: () -> Unit)
|
||||
item(key = "older") {
|
||||
Text(
|
||||
stringResource(R.string.chat_loading_earlier),
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText3,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = TogetherFaint,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
)
|
||||
}
|
||||
@@ -228,7 +230,7 @@ fun ChatScreen(container: AppContainer, sessionKey: String, onBack: () -> Unit)
|
||||
controller.sendError?.let { err ->
|
||||
Text(
|
||||
stringResource(R.string.chat_send_failed, err),
|
||||
color = JadeiteError,
|
||||
color = TogetherDanger,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 4.dp),
|
||||
)
|
||||
@@ -269,7 +271,7 @@ fun ChatScreen(container: AppContainer, sessionKey: String, onBack: () -> Unit)
|
||||
Icon(
|
||||
Icons.Filled.Add,
|
||||
contentDescription = stringResource(R.string.chat_attach),
|
||||
tint = JadeiteText3,
|
||||
tint = TogetherMuted,
|
||||
)
|
||||
}
|
||||
OutlinedTextField(
|
||||
@@ -280,13 +282,13 @@ fun ChatScreen(container: AppContainer, sessionKey: String, onBack: () -> Unit)
|
||||
maxLines = 4,
|
||||
shape = MaterialTheme.shapes.small,
|
||||
colors = OutlinedTextFieldDefaults.colors(
|
||||
focusedBorderColor = JadeiteAccent,
|
||||
unfocusedBorderColor = JadeiteBorder,
|
||||
focusedContainerColor = JadeiteSunken,
|
||||
unfocusedContainerColor = JadeiteSunken,
|
||||
cursorColor = JadeiteAccentText,
|
||||
focusedTextColor = JadeiteText,
|
||||
unfocusedTextColor = JadeiteText,
|
||||
focusedBorderColor = TogetherAccent,
|
||||
unfocusedBorderColor = TogetherBorderStrong,
|
||||
focusedContainerColor = TogetherSurface,
|
||||
unfocusedContainerColor = TogetherSurface,
|
||||
cursorColor = TogetherAccent,
|
||||
focusedTextColor = TogetherText,
|
||||
unfocusedTextColor = TogetherText,
|
||||
),
|
||||
)
|
||||
SendButton(
|
||||
@@ -365,10 +367,10 @@ private fun ChatHeader(
|
||||
Icon(
|
||||
Icons.AutoMirrored.Filled.ArrowBack,
|
||||
contentDescription = stringResource(R.string.chat_back),
|
||||
tint = JadeiteText2,
|
||||
tint = TogetherMuted,
|
||||
)
|
||||
}
|
||||
AppAvatar(face.glyph, accent = face.image == null, size = 34.dp, image = face.image)
|
||||
AppAvatar(face.glyph, size = 34.dp, image = face.image)
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(
|
||||
sessionKey.removePrefix("interactive:"),
|
||||
@@ -377,23 +379,25 @@ private fun ChatHeader(
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
|
||||
StatusDot(tone = connTone(conn))
|
||||
Text(
|
||||
connText(conn),
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
color = if (connTone(conn) == DotTone.Error) JadeiteError else JadeiteText3,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = when (connTone(conn)) {
|
||||
StatusTone.Ok -> TogetherAccent
|
||||
StatusTone.Warn -> TogetherWarn
|
||||
StatusTone.Error -> TogetherDanger
|
||||
StatusTone.Idle -> TogetherMuted
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun connTone(conn: ChatController.Conn): DotTone = when (conn) {
|
||||
ChatController.Conn.Connecting -> DotTone.Warn
|
||||
ChatController.Conn.Live -> DotTone.Ok
|
||||
ChatController.Conn.Reconnecting -> DotTone.Error
|
||||
is ChatController.Conn.Failed -> DotTone.Error
|
||||
private fun connTone(conn: ChatController.Conn): StatusTone = when (conn) {
|
||||
ChatController.Conn.Connecting -> StatusTone.Warn
|
||||
ChatController.Conn.Live -> StatusTone.Ok
|
||||
ChatController.Conn.Reconnecting -> StatusTone.Error
|
||||
is ChatController.Conn.Failed -> StatusTone.Error
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -413,7 +417,7 @@ private fun connText(conn: ChatController.Conn): String = when (conn) {
|
||||
private fun SendButton(enabled: Boolean, onClick: () -> Unit) {
|
||||
Surface(
|
||||
shape = CircleShape,
|
||||
color = if (enabled) JadeiteAccent else JadeiteElevated,
|
||||
color = if (enabled) TogetherAccent else TogetherSurface2,
|
||||
modifier = Modifier
|
||||
.size(44.dp)
|
||||
.clickable(enabled = enabled, onClick = onClick),
|
||||
@@ -422,7 +426,7 @@ private fun SendButton(enabled: Boolean, onClick: () -> Unit) {
|
||||
Icon(
|
||||
Icons.AutoMirrored.Filled.Send,
|
||||
contentDescription = stringResource(R.string.chat_send),
|
||||
tint = if (enabled) JadeiteOnAccent else JadeiteText3,
|
||||
tint = if (enabled) TogetherOnAccent else TogetherMuted,
|
||||
modifier = Modifier.size(20.dp),
|
||||
)
|
||||
}
|
||||
@@ -470,26 +474,39 @@ private fun TurnGroupRow(
|
||||
controller: ChatController,
|
||||
face: AgentFace,
|
||||
) {
|
||||
// The reader's rows say who they are the way the web surface does:
|
||||
// "you" on the conversable keys, "dispatch" on the others, and the
|
||||
// matching initial in the round avatar.
|
||||
val you = controller.sessionKey.startsWith("interactive:") ||
|
||||
controller.sessionKey.startsWith("phone:")
|
||||
val author = stringResource(if (you) R.string.chat_user_you else R.string.chat_user_dispatch)
|
||||
|
||||
when (group) {
|
||||
is TurnGroup.User -> Row(
|
||||
horizontalArrangement = Arrangement.End,
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
) {
|
||||
// The reader's own words: a right-anchored bubble, elevated
|
||||
// one step and marked on its trailing edge — no label or
|
||||
// avatar, the side says whose it is.
|
||||
Row(
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f, fill = false)
|
||||
.height(IntrinsicSize.Min)
|
||||
.background(JadeiteElevated, MaterialTheme.shapes.small),
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 10.dp, vertical = 8.dp)
|
||||
.weight(1f, fill = false),
|
||||
verticalArrangement = Arrangement.spacedBy(4.dp),
|
||||
.size(24.dp)
|
||||
.clip(CircleShape)
|
||||
.background(TogetherSurface2)
|
||||
.border(1.dp, TogetherBorderStrong, CircleShape),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Text(
|
||||
author.take(1).uppercase(),
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
}
|
||||
Column(modifier = Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
Text(
|
||||
author,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
)
|
||||
// The message's images sit above its text, the web
|
||||
// sent row's layout: a locally sent row previews its
|
||||
// own staged files, a replayed one fetches by id.
|
||||
@@ -511,7 +528,7 @@ private fun TurnGroupRow(
|
||||
var chip = 0
|
||||
messageParts(group.text, group.pastes).forEach { part ->
|
||||
when (part) {
|
||||
is PastePart.Text -> Text(part.text, style = MaterialTheme.typography.bodyLarge)
|
||||
is PastePart.Text -> Text(part.text, style = MaterialTheme.typography.bodyMedium)
|
||||
is PastePart.Paste -> {
|
||||
chip += 1
|
||||
PasteChip(chipLabel(part.payload, chip))
|
||||
@@ -519,38 +536,67 @@ private fun TurnGroupRow(
|
||||
}
|
||||
}
|
||||
}
|
||||
AccentBar(JadeiteAccent)
|
||||
}
|
||||
}
|
||||
is TurnGroup.Agent -> Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(IntrinsicSize.Min)
|
||||
.background(
|
||||
TogetherSurface,
|
||||
RoundedCornerShape(
|
||||
topStart = 0.dp,
|
||||
topEnd = 10.dp,
|
||||
bottomEnd = 10.dp,
|
||||
bottomStart = 0.dp,
|
||||
),
|
||||
),
|
||||
) {
|
||||
AccentBar(TogetherAccent, width = 2.dp)
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(12.dp)
|
||||
.weight(1f),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
AppAvatar(face.glyph, accent = face.image == null, image = face.image)
|
||||
Column(modifier = Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Text(
|
||||
face.name ?: stringResource(R.string.chat_agent),
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = if (group.items.any { it is ChatController.Reply && it.streaming }) {
|
||||
JadeiteAccentText
|
||||
} else {
|
||||
JadeiteText2
|
||||
},
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
color = TogetherAccent,
|
||||
)
|
||||
// The design stacks a turn as thinking, tool cards, then the
|
||||
// reply and its outcome — stream order interleaves them, the
|
||||
// rendering does not.
|
||||
// The design's turn surface shows the cards the reader must
|
||||
// act on or can open, the reply, and the outcome word; the
|
||||
// thinking trace and the tool calls stay off it — the same
|
||||
// surface the web draws.
|
||||
group.items.sortedBy { turnPriority(it) }.forEach { item ->
|
||||
when (item) {
|
||||
is ChatController.Thinking -> ThinkingBlock(item)
|
||||
is ChatController.ToolCall ->
|
||||
if (isShellTool(item.name)) ShellRow(item) else ToolCard(item)
|
||||
is ChatController.Attachment -> AttachmentCard(item, container)
|
||||
is ChatController.Consent -> ConsentCard(item, controller)
|
||||
is ChatController.Reply -> ReplyBlock(item)
|
||||
is ChatController.Outcome -> OutcomeTag(item.outcome)
|
||||
is ChatController.UserMessage -> Unit // never grouped here
|
||||
else -> Unit // thinking and tool calls never render
|
||||
}
|
||||
}
|
||||
// A live turn with nothing to read yet — no reply, no
|
||||
// outcome — says so: the spinner row the web surface
|
||||
// shows, and the only honest feedback the phone gets.
|
||||
if (
|
||||
group.items.none { it is ChatController.Outcome } &&
|
||||
group.items.none { it is ChatController.Reply && it.text.isNotBlank() }
|
||||
) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
CircularProgressIndicator(modifier = Modifier.size(12.dp), strokeWidth = 2.dp)
|
||||
Text(
|
||||
stringResource(
|
||||
R.string.chat_working_fmt,
|
||||
face.name ?: stringResource(R.string.chat_agent),
|
||||
),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -558,152 +604,15 @@ private fun TurnGroupRow(
|
||||
}
|
||||
}
|
||||
|
||||
// Render order inside one agent turn: thinking, tools, attachments,
|
||||
// questions, reply, outcome.
|
||||
// Render order inside one agent turn: cards, reply, outcome. The
|
||||
// thinking trace and the tool calls never render, so their order is
|
||||
// whatever falls out of the fold.
|
||||
private fun turnPriority(item: ChatController.Item): Int = when (item) {
|
||||
is ChatController.Thinking -> 0
|
||||
is ChatController.ToolCall -> 1
|
||||
is ChatController.Attachment -> 2
|
||||
is ChatController.Consent -> 3
|
||||
is ChatController.Reply -> 4
|
||||
is ChatController.Outcome -> 5
|
||||
is ChatController.UserMessage -> 6
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ThinkingBlock(item: ChatController.Thinking) {
|
||||
// Dim and collapsible: it is the agent's scratch, not its answer.
|
||||
var expanded by remember(item.id) { mutableStateOf(false) }
|
||||
val text = if (expanded || item.text.length <= 120) item.text else "${item.text.take(120)}…"
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.clickable { expanded = !expanded }
|
||||
.background(JadeiteSurface, MaterialTheme.shapes.extraSmall)
|
||||
.padding(8.dp),
|
||||
) {
|
||||
Text(
|
||||
"thinking",
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
color = JadeiteText3,
|
||||
)
|
||||
Text(
|
||||
text,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
fontStyle = FontStyle.Italic,
|
||||
color = JadeiteText3,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ToolCard(item: ChatController.ToolCall) {
|
||||
val tint = when {
|
||||
item.running -> JadeiteText3
|
||||
item.isError -> JadeiteError
|
||||
else -> JadeiteOk
|
||||
}
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.heightIn(min = 32.dp)
|
||||
.height(IntrinsicSize.Min)
|
||||
.background(JadeiteSurface, MaterialTheme.shapes.extraSmall),
|
||||
) {
|
||||
AccentBar(tint)
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 10.dp, vertical = 6.dp)
|
||||
.weight(1f),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
Text(
|
||||
if (item.running) "…" else if (item.isError) "✗" else "✓",
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = tint,
|
||||
)
|
||||
Text(
|
||||
item.name,
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
item.summary?.takeIf { it.isNotBlank() }?.let { summary ->
|
||||
Text(
|
||||
summary,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText3,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Command rows render as shell lines, not glyph rows (the desktop's
|
||||
* shell_line); run_command is the bash tool's other name. */
|
||||
private fun isShellTool(name: String): Boolean = name == "bash" || name == "run_command"
|
||||
|
||||
@Composable
|
||||
private fun ShellRow(item: ChatController.ToolCall) {
|
||||
val tint = when {
|
||||
item.running -> JadeiteText3
|
||||
item.exitCode == 0L && !item.isError -> JadeiteOk
|
||||
else -> JadeiteError
|
||||
}
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.heightIn(min = 32.dp)
|
||||
.height(IntrinsicSize.Min)
|
||||
.background(JadeiteSurface, MaterialTheme.shapes.extraSmall),
|
||||
) {
|
||||
AccentBar(tint)
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 10.dp, vertical = 6.dp)
|
||||
.weight(1f),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
// A shell line reads as the command it ran: dim $ prefix, the
|
||||
// command, the exit code at its end.
|
||||
Text(
|
||||
"$",
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText3,
|
||||
)
|
||||
Text(
|
||||
item.command ?: "…",
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = Modifier.weight(1f, fill = false),
|
||||
)
|
||||
when {
|
||||
item.running -> Unit
|
||||
item.exitCode != null -> Text(
|
||||
"[${item.exitCode}]",
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
fontFamily = JadeiteMono,
|
||||
color = if (item.exitCode == 0L) JadeiteOk else JadeiteError,
|
||||
)
|
||||
item.isError -> Text(
|
||||
"✗",
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = JadeiteError,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
is ChatController.Attachment -> 0
|
||||
is ChatController.Consent -> 1
|
||||
is ChatController.Reply -> 2
|
||||
is ChatController.Outcome -> 3
|
||||
else -> 4
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -717,33 +626,37 @@ private fun ReplyBlock(item: ChatController.Reply) {
|
||||
@Composable
|
||||
private fun OutcomeTag(outcome: String) {
|
||||
// A steered turn was cut short by the next message, not failed: the
|
||||
// reply that replaced it streams right below, so the tag reads as an
|
||||
// accent, not an error — the same distinction the web UI draws.
|
||||
// reply that replaced it streams right below, so the word reads as
|
||||
// an accent, not an error — the same distinction the web UI draws.
|
||||
val color = when {
|
||||
outcome.equals("Failed", ignoreCase = true) -> JadeiteError
|
||||
outcome.equals("Steered", ignoreCase = true) -> JadeiteAccentText
|
||||
else -> JadeiteText3
|
||||
outcome.equals("Failed", ignoreCase = true) -> TogetherDanger
|
||||
outcome.equals("Steered", ignoreCase = true) -> TogetherAccent
|
||||
outcome.equals("Aborted", ignoreCase = true) -> TogetherWarn
|
||||
else -> TogetherMuted
|
||||
}
|
||||
Text(
|
||||
outcome,
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
fontFamily = JadeiteMono,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun PasteChip(label: String) {
|
||||
Surface(
|
||||
shape = RoundedCornerShape(6.dp),
|
||||
color = TogetherSurface2,
|
||||
border = BorderStroke(1.dp, TogetherBorderStrong),
|
||||
) {
|
||||
Text(
|
||||
label,
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText3,
|
||||
modifier = Modifier
|
||||
.background(JadeiteSunken, MaterialTheme.shapes.extraSmall)
|
||||
.padding(horizontal = 8.dp, vertical = 2.dp),
|
||||
fontFamily = TogetherMono,
|
||||
color = TogetherMuted,
|
||||
modifier = Modifier.padding(horizontal = 8.dp, vertical = 1.dp),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// --- paste chips ------------------------------------------------------
|
||||
// A long paste rides as a chip the render stands in for its payload.
|
||||
@@ -992,9 +905,9 @@ private fun formatSize(size: Long): String = when {
|
||||
@Composable
|
||||
private fun StagedChipView(chip: StagedChip, number: Int, onRemove: () -> Unit) {
|
||||
Surface(
|
||||
shape = MaterialTheme.shapes.extraSmall,
|
||||
color = JadeiteSunken,
|
||||
border = BorderStroke(1.dp, JadeiteBorder),
|
||||
shape = RoundedCornerShape(6.dp),
|
||||
color = TogetherSurface2,
|
||||
border = BorderStroke(1.dp, TogetherBorderStrong),
|
||||
) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
@@ -1014,13 +927,13 @@ private fun StagedChipView(chip: StagedChip, number: Int, onRemove: () -> Unit)
|
||||
Text(
|
||||
"▣$number ${chip.name} ${formatSize(chip.image.sizeBytes)}",
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText3,
|
||||
fontFamily = TogetherMono,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
Icon(
|
||||
Icons.Filled.Close,
|
||||
contentDescription = stringResource(R.string.chat_image_drop, chip.name),
|
||||
tint = JadeiteText3,
|
||||
tint = TogetherMuted,
|
||||
modifier = Modifier
|
||||
.size(14.dp)
|
||||
.clickable(onClick = onRemove),
|
||||
@@ -1051,14 +964,14 @@ private fun ImageErrorRow(error: ImageStageError, onDismiss: () -> Unit) {
|
||||
is ImageStageError.ReadFailed ->
|
||||
stringResource(R.string.chat_image_read_failed, error.name)
|
||||
},
|
||||
color = JadeiteError,
|
||||
color = TogetherDanger,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
modifier = Modifier.weight(1f),
|
||||
)
|
||||
Icon(
|
||||
Icons.Filled.Close,
|
||||
contentDescription = stringResource(R.string.chat_image_dismiss),
|
||||
tint = JadeiteText3,
|
||||
tint = TogetherMuted,
|
||||
modifier = Modifier
|
||||
.size(16.dp)
|
||||
.clickable(onClick = onDismiss),
|
||||
@@ -1097,7 +1010,7 @@ private fun SentImageThumb(image: ChatController.SentImage, container: AppContai
|
||||
.widthIn(max = 240.dp)
|
||||
.heightIn(max = 240.dp)
|
||||
.clip(MaterialTheme.shapes.small)
|
||||
.border(1.dp, JadeiteBorder, MaterialTheme.shapes.small),
|
||||
.border(1.dp, TogetherBorder, MaterialTheme.shapes.small),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1170,24 +1083,16 @@ private fun AttachmentCard(item: ChatController.Attachment, container: AppContai
|
||||
}
|
||||
|
||||
val current = state
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.heightIn(min = 32.dp)
|
||||
.height(IntrinsicSize.Min)
|
||||
.background(JadeiteSurface, MaterialTheme.shapes.extraSmall),
|
||||
Surface(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
shape = RoundedCornerShape(8.dp),
|
||||
color = TogetherSurface2,
|
||||
border = BorderStroke(1.dp, TogetherBorder),
|
||||
) {
|
||||
AccentBar(
|
||||
when (current) {
|
||||
AttachState.Loading -> JadeiteText3
|
||||
is AttachState.Failed -> JadeiteError
|
||||
else -> JadeiteOk
|
||||
},
|
||||
)
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 10.dp, vertical = 6.dp)
|
||||
.weight(1f),
|
||||
.padding(horizontal = 12.dp, vertical = 8.dp)
|
||||
.fillMaxWidth(),
|
||||
verticalArrangement = Arrangement.spacedBy(4.dp),
|
||||
) {
|
||||
Row(
|
||||
@@ -1196,9 +1101,9 @@ private fun AttachmentCard(item: ChatController.Attachment, container: AppContai
|
||||
) {
|
||||
Text(
|
||||
item.name,
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
fontFamily = TogetherMono,
|
||||
color = TogetherText,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = Modifier.weight(1f, fill = false),
|
||||
@@ -1206,12 +1111,12 @@ private fun AttachmentCard(item: ChatController.Attachment, container: AppContai
|
||||
Text(
|
||||
formatBytes(item.size),
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText3,
|
||||
fontFamily = TogetherMono,
|
||||
color = TogetherFaint,
|
||||
)
|
||||
}
|
||||
item.caption?.takeIf { it.isNotBlank() }?.let { caption ->
|
||||
Text(caption, style = MaterialTheme.typography.bodySmall, color = JadeiteText2)
|
||||
Text(caption, style = MaterialTheme.typography.bodySmall, color = TogetherMuted)
|
||||
}
|
||||
if (current is AttachState.Ready) {
|
||||
current.preview?.let { preview ->
|
||||
@@ -1221,21 +1126,23 @@ private fun AttachmentCard(item: ChatController.Attachment, container: AppContai
|
||||
contentScale = ContentScale.Fit,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.heightIn(max = 240.dp),
|
||||
.heightIn(max = 240.dp)
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.border(1.dp, TogetherBorder, RoundedCornerShape(8.dp)),
|
||||
)
|
||||
}
|
||||
current.note?.let { note ->
|
||||
Text(note, style = MaterialTheme.typography.bodySmall, color = JadeiteError)
|
||||
Text(note, style = MaterialTheme.typography.bodySmall, color = TogetherDanger)
|
||||
}
|
||||
}
|
||||
if (current is AttachState.Failed) {
|
||||
Text(current.message, style = MaterialTheme.typography.bodySmall, color = JadeiteError)
|
||||
Text(current.message, style = MaterialTheme.typography.bodySmall, color = TogetherDanger)
|
||||
}
|
||||
if (current is AttachState.Loading) {
|
||||
Text(
|
||||
stringResource(R.string.chat_attachment_downloading),
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = JadeiteText3,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
} else {
|
||||
Text(
|
||||
@@ -1243,8 +1150,9 @@ private fun AttachmentCard(item: ChatController.Attachment, container: AppContai
|
||||
is AttachState.Ready -> stringResource(R.string.chat_attachment_open)
|
||||
else -> stringResource(R.string.chat_attachment_download)
|
||||
},
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = JadeiteAccentText,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = TogetherAccent,
|
||||
fontWeight = FontWeight.Medium,
|
||||
modifier = Modifier.clickable {
|
||||
when (val s = state) {
|
||||
is AttachState.Ready -> {
|
||||
@@ -1306,12 +1214,18 @@ private fun ConsentCard(item: ChatController.Consent, controller: ChatController
|
||||
var busy by remember(item.id) { mutableStateOf(false) }
|
||||
var failure by remember(item.id) { mutableStateOf<String?>(null) }
|
||||
|
||||
// An open question glows warn; a settled card keeps only its tone.
|
||||
// An open question keeps the warn edge; a settled one carries the
|
||||
// answer's tone.
|
||||
val tint = when (item.granted) {
|
||||
null -> JadeiteWarn
|
||||
true -> JadeiteOk
|
||||
false -> JadeiteText3
|
||||
null -> TogetherWarn
|
||||
true -> TogetherOk
|
||||
false -> TogetherDanger
|
||||
}
|
||||
// The kind is the card's small label, spelled the way the web
|
||||
// surface spells it.
|
||||
val kindLabel = stringResource(
|
||||
if (item.kind == "secret") R.string.consent_kind_secret else R.string.consent_kind_phone,
|
||||
)
|
||||
|
||||
fun answer(call: suspend () -> ClawResult<Unit>) {
|
||||
busy = true
|
||||
@@ -1325,43 +1239,47 @@ private fun ConsentCard(item: ChatController.Consent, controller: ChatController
|
||||
}
|
||||
}
|
||||
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(IntrinsicSize.Min)
|
||||
.background(JadeiteSurface, MaterialTheme.shapes.extraSmall),
|
||||
Surface(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
shape = RoundedCornerShape(8.dp),
|
||||
color = TogetherSurface2,
|
||||
border = BorderStroke(1.dp, TogetherBorder),
|
||||
) {
|
||||
Row(modifier = Modifier.height(IntrinsicSize.Min)) {
|
||||
AccentBar(tint)
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 10.dp, vertical = 6.dp)
|
||||
.padding(12.dp)
|
||||
.weight(1f),
|
||||
verticalArrangement = Arrangement.spacedBy(6.dp),
|
||||
) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
AppBadge(item.kind, tint = tint)
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Text(
|
||||
kindLabel,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = TogetherFaint,
|
||||
)
|
||||
Text(
|
||||
item.summary,
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
fontWeight = if (item.granted == false) FontWeight.Normal else FontWeight.SemiBold,
|
||||
color = if (item.granted == false) TogetherMuted else TogetherText,
|
||||
modifier = Modifier.weight(1f, fill = false),
|
||||
)
|
||||
if (item.granted != null) {
|
||||
Text(
|
||||
stringResource(
|
||||
if (item.granted == true) R.string.consent_granted else R.string.consent_denied,
|
||||
),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = if (item.granted == true) TogetherAccent else TogetherDanger,
|
||||
)
|
||||
}
|
||||
Text(item.detail, style = MaterialTheme.typography.bodySmall, color = JadeiteText2)
|
||||
}
|
||||
Text(item.detail, style = MaterialTheme.typography.bodySmall, color = TogetherMuted)
|
||||
when (item.granted) {
|
||||
true -> Text(
|
||||
"✓ " + stringResource(R.string.consent_granted),
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = JadeiteOk,
|
||||
)
|
||||
false -> Text(
|
||||
"✗ " + stringResource(R.string.consent_denied),
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = JadeiteText3,
|
||||
)
|
||||
true -> Unit // the state word in the head says it
|
||||
false -> Unit // the state word in the head says it
|
||||
null -> {
|
||||
if (item.kind == "secret") {
|
||||
OutlinedTextField(
|
||||
@@ -1374,13 +1292,13 @@ private fun ConsentCard(item: ChatController.Consent, controller: ChatController
|
||||
enabled = !busy,
|
||||
shape = MaterialTheme.shapes.small,
|
||||
colors = OutlinedTextFieldDefaults.colors(
|
||||
focusedBorderColor = JadeiteAccent,
|
||||
unfocusedBorderColor = JadeiteBorder,
|
||||
focusedContainerColor = JadeiteSunken,
|
||||
unfocusedContainerColor = JadeiteSunken,
|
||||
cursorColor = JadeiteAccentText,
|
||||
focusedTextColor = JadeiteText,
|
||||
unfocusedTextColor = JadeiteText,
|
||||
focusedBorderColor = TogetherAccent,
|
||||
unfocusedBorderColor = TogetherBorderStrong,
|
||||
focusedContainerColor = TogetherSurface,
|
||||
unfocusedContainerColor = TogetherSurface,
|
||||
cursorColor = TogetherAccent,
|
||||
focusedTextColor = TogetherText,
|
||||
unfocusedTextColor = TogetherText,
|
||||
),
|
||||
)
|
||||
}
|
||||
@@ -1413,12 +1331,13 @@ private fun ConsentCard(item: ChatController.Consent, controller: ChatController
|
||||
Text(
|
||||
stringResource(R.string.consent_answer_failed, fail),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = JadeiteError,
|
||||
color = TogetherDanger,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The agent's face as this screen renders it: the display name (null
|
||||
// keeps the string resource's fallback), the initials glyph, and the
|
||||
|
||||
@@ -3,20 +3,28 @@ package rs.rhema.phone.ui
|
||||
import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.foundation.layout.IntrinsicSize
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.RowScope
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.ArrowDropDown
|
||||
import androidx.compose.material.icons.outlined.CheckCircle
|
||||
import androidx.compose.material.icons.outlined.Info
|
||||
import androidx.compose.material.icons.outlined.Refresh
|
||||
import androidx.compose.material.icons.outlined.Warning
|
||||
import androidx.compose.material3.DropdownMenu
|
||||
import androidx.compose.material3.DropdownMenuItem
|
||||
import androidx.compose.material3.HorizontalDivider
|
||||
@@ -35,90 +43,110 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.lerp
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
// The design language's shared pieces, mirroring the web components:
|
||||
// one card voice, one label voice, one badge/dot/callout vocabulary.
|
||||
// one card voice, one label voice, one badge/word/callout vocabulary.
|
||||
// Screens compose these; nothing here knows about the claw API.
|
||||
|
||||
/** The uppercase letterspaced section label — the repeated typographic voice. */
|
||||
/** The quiet section label — the repeated typographic voice, 11sp
|
||||
* medium in the faint color (main.css's `.label`). */
|
||||
@Composable
|
||||
fun SectionLabel(text: String, modifier: Modifier = Modifier) {
|
||||
Text(
|
||||
text,
|
||||
modifier = modifier,
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = JadeiteText3,
|
||||
letterSpacing = MaterialTheme.typography.labelMedium.letterSpacing * 1.4f,
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Medium,
|
||||
color = TogetherFaint,
|
||||
)
|
||||
}
|
||||
|
||||
enum class DotTone { Ok, Warn, Error, Idle }
|
||||
/** The tones a status word can carry. */
|
||||
enum class StatusTone { Ok, Warn, Error, Idle }
|
||||
|
||||
/** One honest state dot: ok, warn, error, or idle gray. */
|
||||
/** Status is a word: plain text carrying its tone's color — no
|
||||
* container, no dot (main.css's `.state`). */
|
||||
@Composable
|
||||
fun StatusDot(tone: DotTone, modifier: Modifier = Modifier) {
|
||||
fun StatusWord(text: String, tone: StatusTone, modifier: Modifier = Modifier) {
|
||||
val color = when (tone) {
|
||||
DotTone.Ok -> JadeiteOk
|
||||
DotTone.Warn -> JadeiteWarn
|
||||
DotTone.Error -> JadeiteError
|
||||
DotTone.Idle -> JadeiteText3
|
||||
StatusTone.Ok -> TogetherAccent
|
||||
StatusTone.Warn -> TogetherWarn
|
||||
StatusTone.Error -> TogetherDanger
|
||||
StatusTone.Idle -> TogetherFaint
|
||||
}
|
||||
Box(modifier = modifier.size(8.dp).clip(RoundedCornerShape(50)).background(color))
|
||||
Text(
|
||||
text,
|
||||
modifier = modifier,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
/** The pill: one small status or tag word, outlined in its tone. */
|
||||
/** The badge variants, main.css's `.badge` classes. */
|
||||
enum class BadgeVariant { Dim, Accent, Ok, Warn, Error }
|
||||
|
||||
/**
|
||||
* One small tag: a machine spelling or a count — surface-2 ground,
|
||||
* hairline border, mono (main.css's `.badge`). A toned variant colors
|
||||
* the border and text; a status that a word alone can carry belongs in
|
||||
* [StatusWord] instead.
|
||||
*/
|
||||
@Composable
|
||||
fun AppBadge(text: String, modifier: Modifier = Modifier, tint: Color = JadeiteText3) {
|
||||
fun AppBadge(text: String, modifier: Modifier = Modifier, variant: BadgeVariant = BadgeVariant.Dim) {
|
||||
val tone = when (variant) {
|
||||
BadgeVariant.Dim -> null
|
||||
BadgeVariant.Accent -> TogetherAccent
|
||||
BadgeVariant.Ok -> TogetherOk
|
||||
BadgeVariant.Warn -> TogetherWarn
|
||||
BadgeVariant.Error -> TogetherDanger
|
||||
}
|
||||
Surface(
|
||||
modifier = modifier,
|
||||
shape = RoundedCornerShape(50),
|
||||
color = Color.Transparent,
|
||||
border = BorderStroke(1.dp, tint),
|
||||
shape = RoundedCornerShape(6.dp),
|
||||
color = if (variant == BadgeVariant.Accent) TogetherAccentSoft else TogetherSurface2,
|
||||
border = BorderStroke(
|
||||
1.dp,
|
||||
if (tone == null) TogetherBorderStrong else lerp(TogetherBorder, tone, 0.4f),
|
||||
),
|
||||
) {
|
||||
Text(
|
||||
text,
|
||||
modifier = Modifier.padding(horizontal = 8.dp, vertical = 1.dp),
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
fontFamily = JadeiteMono,
|
||||
color = tint,
|
||||
fontFamily = TogetherMono,
|
||||
color = tone ?: TogetherMuted,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The avatar square: the agent's picture when the claw has one, the
|
||||
* accent mark (or a neutral one) otherwise — the same precedence as the
|
||||
* web's `AgentAvatar`.
|
||||
* The avatar circle: the agent's picture when the claw has one, the
|
||||
* accent mark with the name's initial otherwise — the web `AgentAvatar`'s
|
||||
* precedence, now round (main.css's `--r-avatar`).
|
||||
*/
|
||||
@Composable
|
||||
fun AppAvatar(
|
||||
mark: String,
|
||||
accent: Boolean,
|
||||
glyph: String,
|
||||
modifier: Modifier = Modifier,
|
||||
size: Dp = 32.dp,
|
||||
image: ImageBitmap? = null,
|
||||
) {
|
||||
val shape = RoundedCornerShape(size / 4)
|
||||
Box(
|
||||
modifier = modifier
|
||||
.size(size)
|
||||
.clip(shape)
|
||||
.clip(CircleShape)
|
||||
.then(
|
||||
if (image == null) {
|
||||
Modifier
|
||||
.background(if (accent) JadeiteAccent else JadeiteElevated)
|
||||
.border(
|
||||
if (accent) 0.dp else 1.dp,
|
||||
if (accent) Color.Transparent else JadeiteBorderStrong,
|
||||
shape,
|
||||
)
|
||||
Modifier.background(TogetherAccent)
|
||||
} else {
|
||||
Modifier
|
||||
},
|
||||
@@ -134,10 +162,10 @@ fun AppAvatar(
|
||||
)
|
||||
} else {
|
||||
Text(
|
||||
mark,
|
||||
glyph,
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = if (accent) JadeiteOnAccent else JadeiteText2,
|
||||
color = TogetherOnAccent,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -158,9 +186,14 @@ fun PageHeader(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(title, style = MaterialTheme.typography.headlineSmall, fontWeight = FontWeight.Bold)
|
||||
Text(
|
||||
title,
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
)
|
||||
subtitle?.let {
|
||||
Text(it, style = MaterialTheme.typography.bodySmall, color = JadeiteText3)
|
||||
Text(it, style = MaterialTheme.typography.bodySmall, color = TogetherMuted)
|
||||
}
|
||||
}
|
||||
actions?.invoke(this)
|
||||
@@ -182,8 +215,8 @@ fun RhemaCard(
|
||||
Surface(
|
||||
modifier = modifier.fillMaxWidth(),
|
||||
shape = MaterialTheme.shapes.medium,
|
||||
color = JadeiteSurface,
|
||||
border = BorderStroke(1.dp, JadeiteBorder),
|
||||
color = TogetherSurface,
|
||||
border = BorderStroke(1.dp, TogetherBorder),
|
||||
) {
|
||||
Column {
|
||||
Row(
|
||||
@@ -195,7 +228,7 @@ fun RhemaCard(
|
||||
Text(
|
||||
title,
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
modifier = Modifier.weight(1f, fill = false),
|
||||
)
|
||||
meta?.let {
|
||||
@@ -203,11 +236,11 @@ fun RhemaCard(
|
||||
it,
|
||||
modifier = Modifier.padding(start = 12.dp),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
}
|
||||
}
|
||||
HorizontalDivider(color = JadeiteBorder)
|
||||
HorizontalDivider(color = TogetherBorder)
|
||||
Column(content = content)
|
||||
}
|
||||
}
|
||||
@@ -226,7 +259,7 @@ fun CardRow(
|
||||
first: Boolean = false,
|
||||
control: (@Composable () -> Unit)? = null,
|
||||
) {
|
||||
if (!first) HorizontalDivider(color = JadeiteBorder)
|
||||
if (!first) HorizontalDivider(color = TogetherBorder)
|
||||
Row(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
@@ -237,7 +270,7 @@ fun CardRow(
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(title, style = MaterialTheme.typography.titleSmall, fontWeight = FontWeight.SemiBold)
|
||||
description?.let {
|
||||
Text(it, style = MaterialTheme.typography.bodySmall, color = JadeiteText3)
|
||||
Text(it, style = MaterialTheme.typography.bodySmall, color = TogetherMuted)
|
||||
}
|
||||
}
|
||||
control?.invoke()
|
||||
@@ -247,7 +280,9 @@ fun CardRow(
|
||||
/** Tones of [AppCallout]: the inline note vocabulary. */
|
||||
enum class CalloutTone { Info, Ok, Warn, Error }
|
||||
|
||||
/** The toned inline callout — the "changes not applied" voice. */
|
||||
/** The toned inline callout — the "changes not applied" voice: surface-2
|
||||
* ground, a hairline border, and the tone on a one-sided border
|
||||
* (main.css's `.callout`). */
|
||||
@Composable
|
||||
fun AppCallout(
|
||||
tone: CalloutTone,
|
||||
@@ -256,45 +291,52 @@ fun AppCallout(
|
||||
title: String? = null,
|
||||
) {
|
||||
val tint = when (tone) {
|
||||
CalloutTone.Info -> JadeiteInfo
|
||||
CalloutTone.Ok -> JadeiteOk
|
||||
CalloutTone.Warn -> JadeiteWarn
|
||||
CalloutTone.Error -> JadeiteError
|
||||
CalloutTone.Info -> TogetherInfo
|
||||
CalloutTone.Ok -> TogetherOk
|
||||
CalloutTone.Warn -> TogetherWarn
|
||||
CalloutTone.Error -> TogetherDanger
|
||||
}
|
||||
val mark = when (tone) {
|
||||
CalloutTone.Info -> "i"
|
||||
CalloutTone.Ok -> "✓"
|
||||
CalloutTone.Warn -> "↺"
|
||||
CalloutTone.Error -> "✗"
|
||||
val icon = when (tone) {
|
||||
CalloutTone.Info -> Icons.Outlined.Info
|
||||
CalloutTone.Ok -> Icons.Outlined.CheckCircle
|
||||
CalloutTone.Warn -> Icons.Outlined.Refresh
|
||||
CalloutTone.Error -> Icons.Outlined.Warning
|
||||
}
|
||||
Surface(
|
||||
modifier = modifier.fillMaxWidth(),
|
||||
shape = RoundedCornerShape(8.dp),
|
||||
color = tint.copy(alpha = 0.08f),
|
||||
border = BorderStroke(1.dp, JadeiteBorder),
|
||||
color = TogetherSurface2,
|
||||
border = BorderStroke(1.dp, TogetherBorder),
|
||||
) {
|
||||
Row(modifier = Modifier.height(IntrinsicSize.Min)) {
|
||||
AccentBar(tint)
|
||||
Row(
|
||||
modifier = Modifier.padding(12.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
) {
|
||||
Text(
|
||||
mark,
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = tint,
|
||||
Icon(
|
||||
icon,
|
||||
contentDescription = null,
|
||||
tint = tint,
|
||||
modifier = Modifier.size(16.dp),
|
||||
)
|
||||
Column {
|
||||
title?.let {
|
||||
Text(it, style = MaterialTheme.typography.titleSmall, fontWeight = FontWeight.Bold)
|
||||
Text(
|
||||
it,
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
)
|
||||
}
|
||||
Text(text, style = MaterialTheme.typography.bodySmall, color = TogetherMuted)
|
||||
}
|
||||
Text(text, style = MaterialTheme.typography.bodySmall, color = JadeiteText2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The design's select: a sunken field that opens a menu. Options are
|
||||
* The design's select: a field that opens a menu. Options are
|
||||
* (value, label) pairs; an empty-string value is a legitimate option
|
||||
* ("(provider default)"), which is why selection is by value.
|
||||
*/
|
||||
@@ -311,8 +353,8 @@ fun RhemaSelect(
|
||||
Box(modifier) {
|
||||
Surface(
|
||||
shape = RoundedCornerShape(8.dp),
|
||||
color = JadeiteSunken,
|
||||
border = BorderStroke(1.dp, JadeiteBorder),
|
||||
color = TogetherSurface,
|
||||
border = BorderStroke(1.dp, TogetherBorderStrong),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
@@ -328,15 +370,21 @@ fun RhemaSelect(
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
color = if (selected == null) JadeiteText3 else JadeiteText,
|
||||
color = if (selected == null) TogetherFaint else TogetherText,
|
||||
)
|
||||
Icon(
|
||||
Icons.Filled.ArrowDropDown,
|
||||
contentDescription = null,
|
||||
tint = TogetherMuted,
|
||||
modifier = Modifier.size(18.dp),
|
||||
)
|
||||
Text("▾", style = MaterialTheme.typography.bodySmall, color = JadeiteText3)
|
||||
}
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = open,
|
||||
onDismissRequest = { open = false },
|
||||
containerColor = JadeiteElevated,
|
||||
containerColor = TogetherSurface,
|
||||
shape = RoundedCornerShape(8.dp),
|
||||
) {
|
||||
options.forEach { (value, optionLabel) ->
|
||||
DropdownMenuItem(
|
||||
@@ -344,8 +392,8 @@ fun RhemaSelect(
|
||||
Text(
|
||||
optionLabel,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
fontFamily = if (value.isEmpty()) null else JadeiteMono,
|
||||
color = if (value == selected) JadeiteAccentText else JadeiteText2,
|
||||
fontFamily = if (value.isEmpty()) null else TogetherMono,
|
||||
color = if (value == selected) TogetherAccent else TogetherText,
|
||||
)
|
||||
},
|
||||
onClick = {
|
||||
@@ -358,10 +406,12 @@ fun RhemaSelect(
|
||||
}
|
||||
}
|
||||
|
||||
/** The tool-card accent bar: the design's one-sided border. The parent row must size itself (IntrinsicSize.Min) for the bar to span it. */
|
||||
/** The one-sided border: a callout's tone, a turn card's accent. The
|
||||
* parent row must size itself (IntrinsicSize.Min) for the bar to span
|
||||
* it. */
|
||||
@Composable
|
||||
fun AccentBar(color: Color, modifier: Modifier = Modifier) {
|
||||
Box(modifier = modifier.width(3.dp).fillMaxHeight().background(color))
|
||||
fun AccentBar(color: Color, modifier: Modifier = Modifier, width: Dp = 3.dp) {
|
||||
Box(modifier = modifier.width(width).fillMaxHeight().background(color))
|
||||
}
|
||||
|
||||
/** A quiet icon action: transparent, dim, brightening on press. */
|
||||
@@ -374,6 +424,6 @@ fun GhostIcon(
|
||||
onClick: () -> Unit,
|
||||
) {
|
||||
IconButton(onClick = onClick, enabled = enabled, modifier = modifier) {
|
||||
Icon(icon, contentDescription = contentDescription, tint = JadeiteText3)
|
||||
Icon(icon, contentDescription = contentDescription, tint = TogetherMuted)
|
||||
}
|
||||
}
|
||||
@@ -151,14 +151,14 @@ private fun WorkRow(
|
||||
WorkInfo.State.CANCELLED -> stringResource(R.string.diag_state_cancelled)
|
||||
}
|
||||
}
|
||||
val tint = when {
|
||||
infos == null -> JadeiteWarn
|
||||
info == null && absentLabel == null -> JadeiteError
|
||||
val tone = when {
|
||||
infos == null -> StatusTone.Warn
|
||||
info == null && absentLabel == null -> StatusTone.Error
|
||||
else -> when (info?.state) {
|
||||
WorkInfo.State.RUNNING -> JadeiteOk
|
||||
WorkInfo.State.FAILED, WorkInfo.State.CANCELLED -> JadeiteError
|
||||
WorkInfo.State.BLOCKED -> JadeiteWarn
|
||||
else -> JadeiteText3
|
||||
WorkInfo.State.RUNNING -> StatusTone.Ok
|
||||
WorkInfo.State.FAILED, WorkInfo.State.CANCELLED -> StatusTone.Error
|
||||
WorkInfo.State.BLOCKED -> StatusTone.Warn
|
||||
else -> StatusTone.Idle
|
||||
}
|
||||
}
|
||||
val detail = when {
|
||||
@@ -174,7 +174,7 @@ private fun WorkRow(
|
||||
).joinToString(" · ").ifEmpty { null }
|
||||
}
|
||||
CardRow(title = label, description = detail, first = first) {
|
||||
AppBadge(stateLabel, tint = tint)
|
||||
StatusWord(stateLabel, tone)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,21 +214,23 @@ private fun ClocksCard(container: AppContainer, resumeKey: Int) {
|
||||
description = stringResource(R.string.diag_clock_phone_desc),
|
||||
first = true,
|
||||
) {
|
||||
AppBadge(if (lastReportAt > 0) clock(lastReportAt) else stringResource(R.string.diag_clock_never))
|
||||
if (lastReportAt > 0) {
|
||||
AppBadge(clock(lastReportAt))
|
||||
} else {
|
||||
StatusWord(stringResource(R.string.diag_clock_never), StatusTone.Idle)
|
||||
}
|
||||
}
|
||||
CardRow(
|
||||
title = stringResource(R.string.diag_clock_claw),
|
||||
description = stringResource(R.string.diag_clock_claw_desc),
|
||||
) {
|
||||
val seen = clawSeen
|
||||
AppBadge(
|
||||
when {
|
||||
clawError != null -> stringResource(R.string.diag_clock_unreachable)
|
||||
seen == null -> stringResource(R.string.diag_state_checking)
|
||||
seen < 0 -> stringResource(R.string.diag_clock_never)
|
||||
else -> clock(seen)
|
||||
},
|
||||
)
|
||||
clawError != null -> StatusWord(stringResource(R.string.diag_clock_unreachable), StatusTone.Error)
|
||||
seen == null -> StatusWord(stringResource(R.string.diag_state_checking), StatusTone.Warn)
|
||||
seen < 0 -> StatusWord(stringResource(R.string.diag_clock_never), StatusTone.Idle)
|
||||
else -> AppBadge(clock(seen))
|
||||
}
|
||||
}
|
||||
|
||||
val currentError = clawError
|
||||
@@ -289,7 +291,7 @@ private fun ChecksCard(resumeKey: Int) {
|
||||
first = true,
|
||||
) {
|
||||
if (powerOk) {
|
||||
AppBadge(stringResource(R.string.diag_check_ok), tint = JadeiteOk)
|
||||
StatusWord(stringResource(R.string.diag_check_ok), StatusTone.Ok)
|
||||
} else {
|
||||
OutlinedButton(onClick = {
|
||||
context.startActivity(Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS))
|
||||
@@ -303,7 +305,7 @@ private fun ChecksCard(resumeKey: Int) {
|
||||
description = stringResource(R.string.diag_check_background_desc),
|
||||
) {
|
||||
if (backgroundOk) {
|
||||
AppBadge(stringResource(R.string.diag_check_ok), tint = JadeiteOk)
|
||||
StatusWord(stringResource(R.string.diag_check_ok), StatusTone.Ok)
|
||||
} else {
|
||||
OutlinedButton(onClick = { openAppDetails(context) }) {
|
||||
Text(stringResource(R.string.diag_check_background_fix))
|
||||
@@ -315,7 +317,7 @@ private fun ChecksCard(resumeKey: Int) {
|
||||
description = stringResource(R.string.diag_check_notifications_desc),
|
||||
) {
|
||||
if (notificationsOk) {
|
||||
AppBadge(stringResource(R.string.diag_check_ok), tint = JadeiteOk)
|
||||
StatusWord(stringResource(R.string.diag_check_ok), StatusTone.Ok)
|
||||
} else {
|
||||
OutlinedButton(onClick = {
|
||||
context.startActivity(
|
||||
@@ -357,15 +359,15 @@ private fun LogCard(container: AppContainer) {
|
||||
Text(
|
||||
stringResource(R.string.diag_log_empty),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
} else {
|
||||
entries.reversed().take(60).forEach { entry ->
|
||||
Text(
|
||||
clock(entry.at) + " " + entry.line,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText2,
|
||||
fontFamily = TogetherMono,
|
||||
color = TogetherText,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.mikepenz.markdown.model.markdownDimens
|
||||
// Agent replies are markdown; this renders them the way the web UI's
|
||||
// AppMarkdown does. The parser runs the GFM flavour: raw HTML in the
|
||||
// source stays literal, so model output cannot mount markup here.
|
||||
// Code and links pin Jadeite tokens; everything else follows the theme.
|
||||
// Code and links pin Together tokens; everything else follows the theme.
|
||||
// Headings step down from the Material display sizes: a chat reply is
|
||||
// not a document (the web styles ride the same scale).
|
||||
@Composable
|
||||
@@ -30,10 +30,10 @@ internal fun AgentMarkdown(text: String, modifier: Modifier = Modifier, streamin
|
||||
Markdown(
|
||||
if (streaming) text + "▊" else text,
|
||||
colors = markdownColor(
|
||||
codeBackground = JadeiteSunken,
|
||||
inlineCodeBackground = JadeiteSunken,
|
||||
dividerColor = JadeiteBorder,
|
||||
tableBackground = JadeiteSurface,
|
||||
codeBackground = TogetherSurface2,
|
||||
inlineCodeBackground = TogetherSurface2,
|
||||
dividerColor = TogetherBorder,
|
||||
tableBackground = TogetherSurface,
|
||||
),
|
||||
typography = markdownTypography(
|
||||
h1 = base.copy(fontWeight = FontWeight.Bold),
|
||||
@@ -43,13 +43,13 @@ internal fun AgentMarkdown(text: String, modifier: Modifier = Modifier, streamin
|
||||
h5 = base.copy(fontSize = 13.sp, fontWeight = FontWeight.Bold),
|
||||
h6 = base.copy(fontSize = 13.sp, fontWeight = FontWeight.Bold),
|
||||
code = MaterialTheme.typography.bodySmall.copy(
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText,
|
||||
fontFamily = TogetherMono,
|
||||
color = TogetherText,
|
||||
),
|
||||
inlineCode = base.copy(fontFamily = JadeiteMono, color = JadeiteText),
|
||||
inlineCode = base.copy(fontFamily = TogetherMono, color = TogetherText),
|
||||
textLink = TextLinkStyles(
|
||||
style = SpanStyle(
|
||||
color = JadeiteAccentText,
|
||||
color = TogetherAccent,
|
||||
textDecoration = TextDecoration.Underline,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -99,12 +99,12 @@ fun PhonesCard(container: AppContainer) {
|
||||
list == null -> Text(
|
||||
stringResource(R.string.phones_loading),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
list.isEmpty() -> Text(
|
||||
stringResource(R.string.phones_empty),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
else -> {
|
||||
forgotName?.let { name ->
|
||||
@@ -221,11 +221,12 @@ fun ReportingCard() {
|
||||
}
|
||||
}
|
||||
|
||||
/** On reads as a quiet badge; off as a button into the system settings. */
|
||||
/** On reads as a word in the ok tone; off as a button into the system
|
||||
* settings. */
|
||||
@Composable
|
||||
private fun GrantControl(on: Boolean, onAllow: () -> Unit) {
|
||||
if (on) {
|
||||
AppBadge(stringResource(R.string.reporting_on), tint = JadeiteOk)
|
||||
StatusWord(stringResource(R.string.reporting_on), StatusTone.Ok)
|
||||
} else {
|
||||
OutlinedButton(onClick = onAllow) {
|
||||
Text(stringResource(R.string.reporting_allow))
|
||||
|
||||
@@ -35,9 +35,9 @@ import rs.rhema.phone.net.SessionInfo
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
// The session inventory, the design's sidebar as a screen: grouped
|
||||
// interactive-first rows with an honest state dot and the inbox depth.
|
||||
// Displayed names drop the `interactive:` prefix; the full key is what
|
||||
// gets opened.
|
||||
// interactive-first rows whose meta line speaks in state words and the
|
||||
// inbox depth. Displayed names drop the `interactive:` prefix; the full
|
||||
// key is what gets opened.
|
||||
@Composable
|
||||
fun SessionsScreen(
|
||||
container: AppContainer,
|
||||
@@ -110,7 +110,7 @@ fun SessionsScreen(
|
||||
stringResource(R.string.sessions_empty),
|
||||
modifier = Modifier.padding(horizontal = 16.dp),
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
visible != null -> SessionsList(
|
||||
sessions = visible,
|
||||
@@ -181,7 +181,6 @@ private fun SessionRow(session: SessionInfo, onClick: () -> Unit) {
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
) {
|
||||
StatusDot(tone = stateTone(session.state))
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(
|
||||
session.key.removePrefix("interactive:"),
|
||||
@@ -189,26 +188,27 @@ private fun SessionRow(session: SessionInfo, onClick: () -> Unit) {
|
||||
maxLines = 1,
|
||||
overflow = androidx.compose.ui.text.style.TextOverflow.Ellipsis,
|
||||
)
|
||||
Text(
|
||||
listOfNotNull(
|
||||
session.state,
|
||||
session.revision?.let { "rev $it" },
|
||||
).joinToString(" · "),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText3,
|
||||
// Status is a word: the state in its tone, the inbox depth
|
||||
// queued beside it — the web sidebar's meta line.
|
||||
val depth = session.inboxDepth ?: 0
|
||||
if (session.state != null || depth > 0) {
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
when (session.state) {
|
||||
"leased" -> StatusWord(
|
||||
stringResource(R.string.sessions_state_running),
|
||||
StatusTone.Ok,
|
||||
)
|
||||
"reacquire" -> StatusWord(
|
||||
stringResource(R.string.sessions_state_waiting),
|
||||
StatusTone.Warn,
|
||||
)
|
||||
else -> session.state?.let { StatusWord(it, StatusTone.Idle) }
|
||||
}
|
||||
if (depth > 0) {
|
||||
StatusWord(stringResource(R.string.sessions_queued_fmt, depth), StatusTone.Idle)
|
||||
}
|
||||
}
|
||||
val depth = session.inboxDepth
|
||||
if (depth != null && depth > 0) {
|
||||
AppBadge(depth.toString(), tint = JadeiteInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Leased keys are alive, reacquiring ones are troubled, the rest idle. */
|
||||
private fun stateTone(state: String?): DotTone = when (state) {
|
||||
"leased" -> DotTone.Ok
|
||||
"reacquire" -> DotTone.Warn
|
||||
else -> DotTone.Idle
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
@@ -164,10 +165,14 @@ private fun SettingsNav(onSelect: (String) -> Unit) {
|
||||
Text(
|
||||
stringResource(entry.descRes),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
}
|
||||
Text("›", style = MaterialTheme.typography.titleMedium, color = JadeiteText3)
|
||||
Icon(
|
||||
Icons.AutoMirrored.Filled.KeyboardArrowRight,
|
||||
contentDescription = null,
|
||||
tint = TogetherFaint,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,7 +192,7 @@ private fun SettingsPage(title: String, onBack: () -> Unit, content: @Composable
|
||||
Icon(
|
||||
Icons.AutoMirrored.Filled.ArrowBack,
|
||||
contentDescription = stringResource(R.string.settings_back),
|
||||
tint = JadeiteText2,
|
||||
tint = TogetherMuted,
|
||||
)
|
||||
}
|
||||
Text(title, style = MaterialTheme.typography.headlineSmall, fontWeight = FontWeight.Bold)
|
||||
@@ -227,7 +232,7 @@ private fun ConnectionPage(container: AppContainer, onConnected: () -> Unit, onB
|
||||
Icon(
|
||||
Icons.AutoMirrored.Filled.ArrowBack,
|
||||
contentDescription = stringResource(R.string.settings_back),
|
||||
tint = JadeiteText2,
|
||||
tint = TogetherMuted,
|
||||
)
|
||||
}
|
||||
Text(
|
||||
@@ -290,7 +295,7 @@ private fun ConnectionCard(
|
||||
enabled = !busy,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
shape = MaterialTheme.shapes.small,
|
||||
colors = sunkenFieldColors(),
|
||||
colors = surfaceFieldColors(),
|
||||
)
|
||||
OutlinedTextField(
|
||||
value = token,
|
||||
@@ -301,7 +306,7 @@ private fun ConnectionCard(
|
||||
enabled = !busy,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
shape = MaterialTheme.shapes.small,
|
||||
colors = sunkenFieldColors(),
|
||||
colors = surfaceFieldColors(),
|
||||
)
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Button(enabled = !busy && baseUrl.isNotBlank(), onClick = onConnect) {
|
||||
@@ -320,13 +325,13 @@ private fun ConnectionCard(
|
||||
Text(
|
||||
stringResource(R.string.device_id_fmt, deviceId),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
fontFamily = JadeiteMono,
|
||||
color = JadeiteText3,
|
||||
fontFamily = TogetherMono,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
Text(
|
||||
stringResource(R.string.settings_hint),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -405,13 +410,13 @@ private fun ProvidersCard(container: AppContainer) {
|
||||
currentState == null -> Text(
|
||||
stringResource(R.string.providers_loading),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
else -> {
|
||||
Text(
|
||||
stringResource(R.string.providers_field_provider),
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
RhemaSelect(
|
||||
selected = draftProvider,
|
||||
@@ -427,7 +432,7 @@ private fun ProvidersCard(container: AppContainer) {
|
||||
Text(
|
||||
stringResource(R.string.providers_field_model),
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
RhemaSelect(
|
||||
selected = draftModel,
|
||||
@@ -444,7 +449,7 @@ private fun ProvidersCard(container: AppContainer) {
|
||||
Text(
|
||||
stringResource(R.string.providers_none),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = JadeiteText3,
|
||||
color = TogetherMuted,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -553,14 +558,15 @@ private sealed interface ListingState {
|
||||
|
||||
private const val DEFAULT_MODEL = ""
|
||||
|
||||
/** The design's input voice: sunken ground, hairline border, accent focus. */
|
||||
/** The design's input voice: surface ground, strong hairline, accent
|
||||
* focus — main.css's `input`. */
|
||||
@Composable
|
||||
private fun sunkenFieldColors() = OutlinedTextFieldDefaults.colors(
|
||||
focusedBorderColor = JadeiteAccent,
|
||||
unfocusedBorderColor = JadeiteBorder,
|
||||
focusedContainerColor = JadeiteSunken,
|
||||
unfocusedContainerColor = JadeiteSunken,
|
||||
cursorColor = JadeiteAccentText,
|
||||
focusedTextColor = JadeiteText,
|
||||
unfocusedTextColor = JadeiteText,
|
||||
private fun surfaceFieldColors() = OutlinedTextFieldDefaults.colors(
|
||||
focusedBorderColor = TogetherAccent,
|
||||
unfocusedBorderColor = TogetherBorderStrong,
|
||||
focusedContainerColor = TogetherSurface,
|
||||
unfocusedContainerColor = TogetherSurface,
|
||||
cursorColor = TogetherAccent,
|
||||
focusedTextColor = TogetherText,
|
||||
unfocusedTextColor = TogetherText,
|
||||
)
|
||||
@@ -1,78 +1,169 @@
|
||||
package rs.rhema.phone.ui
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.ColorScheme
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Shapes
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.material3.Shapes
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.staticCompositionLocalOf
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
// The Jadeite dark tokens, lifted from crates/rhema-code/src/palette.rs
|
||||
// DARK: one design system across the TUI, the web UI, and this app.
|
||||
// Dark is the design's primary; there is deliberately no light scheme
|
||||
// and no dynamic color — the palette is the brand.
|
||||
/** The design's dark ground; also the system-bar scrim. */
|
||||
internal val JadeiteGround = Color(0xFF0F1413)
|
||||
internal val JadeiteSurface = Color(0xFF171D1B)
|
||||
internal val JadeiteElevated = Color(0xFF1F2624)
|
||||
internal val JadeiteSunken = Color(0xFF0A0F0E)
|
||||
internal val JadeiteBorder = Color(0xFF28312E)
|
||||
internal val JadeiteBorderStrong = Color(0xFF3D4844)
|
||||
internal val JadeiteText = Color(0xFFEEF3F1)
|
||||
internal val JadeiteText2 = Color(0xFFB9C6C1)
|
||||
internal val JadeiteText3 = Color(0xFF87948F)
|
||||
internal val JadeiteAccent = Color(0xFF35A882)
|
||||
internal val JadeiteAccentText = Color(0xFF64C9A3)
|
||||
internal val JadeiteOnAccent = Color(0xFF07110D)
|
||||
internal val JadeiteOk = Color(0xFF4FBF94)
|
||||
internal val JadeiteWarn = Color(0xFFD9A643)
|
||||
internal val JadeiteError = Color(0xFFE4687A)
|
||||
internal val JadeiteInfo = Color(0xFF8FA6B8)
|
||||
// The Rhema Together tokens, lifted from web/claw/app/assets/css/main.css:
|
||||
// a warm paper ground, white cards, one jade accent, and status color only
|
||||
// where a state needs it — one design system across the web UI and this
|
||||
// app. Light is the design's default; the dark values follow the operating
|
||||
// system, as the web's `prefers-color-scheme` does. There is no dynamic
|
||||
// color: the palette is the brand.
|
||||
|
||||
/** Machine spellings — keys, model ids, outcomes — render mono. */
|
||||
internal val JadeiteMono: FontFamily = FontFamily.Monospace
|
||||
/** The light ground; also the light system-bar scrim. */
|
||||
internal val TogetherGroundLight = Color(0xFFF7F6F3)
|
||||
|
||||
private val JadeiteDark = darkColorScheme(
|
||||
primary = JadeiteAccent,
|
||||
onPrimary = JadeiteOnAccent,
|
||||
primaryContainer = JadeiteElevated,
|
||||
onPrimaryContainer = JadeiteAccentText,
|
||||
secondary = JadeiteAccentText,
|
||||
onSecondary = JadeiteOnAccent,
|
||||
tertiary = JadeiteInfo,
|
||||
background = JadeiteGround,
|
||||
onBackground = JadeiteText,
|
||||
surface = JadeiteSurface,
|
||||
onSurface = JadeiteText,
|
||||
surfaceVariant = JadeiteElevated,
|
||||
onSurfaceVariant = JadeiteText2,
|
||||
surfaceContainerLowest = JadeiteGround,
|
||||
surfaceContainerLow = JadeiteSurface,
|
||||
surfaceContainer = JadeiteSurface,
|
||||
surfaceContainerHigh = JadeiteElevated,
|
||||
surfaceContainerHighest = JadeiteElevated,
|
||||
outline = JadeiteBorder,
|
||||
outlineVariant = JadeiteBorderStrong,
|
||||
error = JadeiteError,
|
||||
/** The dark ground; also the dark system-bar scrim. */
|
||||
internal val TogetherGroundDark = Color(0xFF12110F)
|
||||
|
||||
/** One palette's values, spelled the way main.css names them. */
|
||||
private data class TogetherColors(
|
||||
val ground: Color,
|
||||
val surface: Color,
|
||||
val surface2: Color,
|
||||
val border: Color,
|
||||
val borderStrong: Color,
|
||||
val text: Color,
|
||||
val muted: Color,
|
||||
val faint: Color,
|
||||
val accent: Color,
|
||||
val accentSoft: Color,
|
||||
val onAccent: Color,
|
||||
val ok: Color,
|
||||
val warn: Color,
|
||||
val danger: Color,
|
||||
val info: Color,
|
||||
)
|
||||
|
||||
// The design's shape language: soft cards on a hairline grid, controls a
|
||||
// step softer. Default Material radii read as someone else's app.
|
||||
private val JadeiteShapes = Shapes(
|
||||
private val LightColors = TogetherColors(
|
||||
ground = Color(0xFFF7F6F3),
|
||||
surface = Color(0xFFFFFFFF),
|
||||
surface2 = Color(0xFFF1EFE9),
|
||||
border = Color(0xFFE4E0D8),
|
||||
borderStrong = Color(0xFFD3CEC3),
|
||||
text = Color(0xFF1F1D1A),
|
||||
muted = Color(0xFF736D63),
|
||||
faint = Color(0xFF9A9388),
|
||||
accent = Color(0xFF2F6F5E),
|
||||
accentSoft = Color(0xFFE7F1ED),
|
||||
onAccent = Color(0xFFFFFFFF),
|
||||
ok = Color(0xFF2F6F5E),
|
||||
warn = Color(0xFF8A6519),
|
||||
danger = Color(0xFFA33A2F),
|
||||
info = Color(0xFF4F5F8F),
|
||||
)
|
||||
|
||||
private val DarkColors = TogetherColors(
|
||||
ground = Color(0xFF12110F),
|
||||
surface = Color(0xFF1A1917),
|
||||
surface2 = Color(0xFF22201D),
|
||||
border = Color(0xFF272521),
|
||||
borderStrong = Color(0xFF3A3733),
|
||||
text = Color(0xFFF2F0EC),
|
||||
muted = Color(0xFFA49D92),
|
||||
faint = Color(0xFF7D766C),
|
||||
accent = Color(0xFF58A58C),
|
||||
accentSoft = Color(0xFF1E2F2A),
|
||||
onAccent = Color(0xFF12110F),
|
||||
ok = Color(0xFF58A58C),
|
||||
warn = Color(0xFFC9A45C),
|
||||
danger = Color(0xFFD07366),
|
||||
info = Color(0xFF8B9BD0),
|
||||
)
|
||||
|
||||
private val LocalTogetherColors = staticCompositionLocalOf { LightColors }
|
||||
|
||||
/** Machine spellings — keys, model ids, outcomes — render mono. The web
|
||||
* bundles FiraCode Nerd Font Mono; the phone keeps the platform mono,
|
||||
* which its small utility text reads fine in. */
|
||||
internal val TogetherMono: FontFamily = FontFamily.Monospace
|
||||
|
||||
// The tokens. Reads resolve to the scheme the OS asked for.
|
||||
internal val TogetherGround: Color @Composable get() = LocalTogetherColors.current.ground
|
||||
internal val TogetherSurface: Color @Composable get() = LocalTogetherColors.current.surface
|
||||
internal val TogetherSurface2: Color @Composable get() = LocalTogetherColors.current.surface2
|
||||
internal val TogetherBorder: Color @Composable get() = LocalTogetherColors.current.border
|
||||
internal val TogetherBorderStrong: Color @Composable get() = LocalTogetherColors.current.borderStrong
|
||||
internal val TogetherText: Color @Composable get() = LocalTogetherColors.current.text
|
||||
internal val TogetherMuted: Color @Composable get() = LocalTogetherColors.current.muted
|
||||
internal val TogetherFaint: Color @Composable get() = LocalTogetherColors.current.faint
|
||||
internal val TogetherAccent: Color @Composable get() = LocalTogetherColors.current.accent
|
||||
internal val TogetherAccentSoft: Color @Composable get() = LocalTogetherColors.current.accentSoft
|
||||
internal val TogetherOnAccent: Color @Composable get() = LocalTogetherColors.current.onAccent
|
||||
internal val TogetherOk: Color @Composable get() = LocalTogetherColors.current.ok
|
||||
internal val TogetherWarn: Color @Composable get() = LocalTogetherColors.current.warn
|
||||
internal val TogetherDanger: Color @Composable get() = LocalTogetherColors.current.danger
|
||||
internal val TogetherInfo: Color @Composable get() = LocalTogetherColors.current.info
|
||||
|
||||
/** Material slots filled from the palette, so the stock components (menus,
|
||||
* dialogs, text fields, the spinner) speak the same colors. */
|
||||
private fun TogetherColors.toColorScheme(dark: Boolean): ColorScheme {
|
||||
val base = if (dark) darkColorScheme() else lightColorScheme()
|
||||
return base.copy(
|
||||
primary = accent,
|
||||
onPrimary = onAccent,
|
||||
primaryContainer = accentSoft,
|
||||
onPrimaryContainer = accent,
|
||||
secondary = accent,
|
||||
onSecondary = onAccent,
|
||||
tertiary = info,
|
||||
onTertiary = onAccent,
|
||||
background = ground,
|
||||
onBackground = text,
|
||||
surface = surface,
|
||||
onSurface = text,
|
||||
surfaceVariant = surface2,
|
||||
onSurfaceVariant = muted,
|
||||
surfaceContainerLowest = ground,
|
||||
surfaceContainerLow = surface,
|
||||
surfaceContainer = surface,
|
||||
surfaceContainerHigh = surface2,
|
||||
surfaceContainerHighest = surface2,
|
||||
surfaceTint = surface,
|
||||
outline = borderStrong,
|
||||
outlineVariant = border,
|
||||
error = danger,
|
||||
onError = onAccent,
|
||||
errorContainer = surface2,
|
||||
onErrorContainer = danger,
|
||||
inverseSurface = text,
|
||||
inverseOnSurface = ground,
|
||||
inversePrimary = accent,
|
||||
scrim = Color.Black,
|
||||
)
|
||||
}
|
||||
|
||||
// The design's shape language: cards a 10, controls an 8, badges a 6 —
|
||||
// main.css's --r-card, --r-control, and the badge radius.
|
||||
private val TogetherShapes = Shapes(
|
||||
extraSmall = RoundedCornerShape(6.dp),
|
||||
small = RoundedCornerShape(8.dp),
|
||||
medium = RoundedCornerShape(10.dp),
|
||||
large = RoundedCornerShape(14.dp),
|
||||
)
|
||||
|
||||
/** The app's theme: Jadeite dark, always — matching the TUI and the web UI. */
|
||||
/** The app's theme: Together's light scheme, the dark one while the OS
|
||||
* asks for dark — matching the web UI. */
|
||||
@Composable
|
||||
fun RhemaTheme(content: @Composable () -> Unit) {
|
||||
val dark = isSystemInDarkTheme()
|
||||
val colors = if (dark) DarkColors else LightColors
|
||||
CompositionLocalProvider(LocalTogetherColors provides colors) {
|
||||
MaterialTheme(
|
||||
colorScheme = JadeiteDark,
|
||||
shapes = JadeiteShapes,
|
||||
colorScheme = colors.toColorScheme(dark),
|
||||
shapes = TogetherShapes,
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- The dark ground for the night launch theme. -->
|
||||
<resources>
|
||||
<color name="together_ground">#FF12110F</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- The launch theme while the OS asks for dark: the platform's dark
|
||||
Material over Together's dark ground. -->
|
||||
<resources>
|
||||
<style name="Theme.Rhema" parent="android:Theme.Material.NoActionBar">
|
||||
<item name="android:windowBackground">@color/together_ground</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- The two grounds, named for the launch theme's window background;
|
||||
the night twin picks the dark one. -->
|
||||
<resources>
|
||||
<color name="together_ground">#FFF7F6F3</color>
|
||||
</resources>
|
||||
@@ -22,6 +22,9 @@
|
||||
<string name="sessions_http_error">The claw returned HTTP %1$d</string>
|
||||
<string name="sessions_network_error">Cannot reach the claw: %1$s</string>
|
||||
<string name="sessions_unauthorized_hint">HTTP 401 means the bearer token is wrong or missing. Update it in Settings.</string>
|
||||
<string name="sessions_state_running">running</string>
|
||||
<string name="sessions_state_waiting">waiting</string>
|
||||
<string name="sessions_queued_fmt">%1$d queued</string>
|
||||
|
||||
<string name="chat_back">Back</string>
|
||||
<string name="chat_send">Send</string>
|
||||
@@ -32,8 +35,9 @@
|
||||
<string name="chat_status_failed">disconnected: %1$s</string>
|
||||
<string name="chat_status_unauthorized">unauthorized; check the token in Settings</string>
|
||||
<string name="chat_send_failed">Send failed: %1$s</string>
|
||||
<string name="chat_tool_running">tool running: %1$s</string>
|
||||
<string name="chat_tool_done">tool: %1$s</string>
|
||||
<string name="chat_user_you">you</string>
|
||||
<string name="chat_user_dispatch">dispatch</string>
|
||||
<string name="chat_working_fmt">%1$s is working</string>
|
||||
<string name="chat_attachment_download">Download and open</string>
|
||||
<string name="chat_loading_earlier">loading earlier turns</string>
|
||||
<string name="chat_attachment_downloading">downloading…</string>
|
||||
@@ -51,6 +55,8 @@
|
||||
<string name="chat_image_bad_type">%1$s: not a png, jpeg, gif, or webp image</string>
|
||||
<string name="chat_image_read_failed">%1$s: could not be read</string>
|
||||
<string name="chat_sent_image">Attached image</string>
|
||||
<string name="consent_kind_secret">Secret</string>
|
||||
<string name="consent_kind_phone">Phone control</string>
|
||||
<string name="consent_secret_hint">The secret the agent asked for</string>
|
||||
<string name="consent_submit">Send secret</string>
|
||||
<string name="consent_approve">Approve</string>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- The launch theme behind the first frame: Together's light ground.
|
||||
The night twin swaps the platform's dark Material so the window
|
||||
never flashes the wrong palette before Compose draws. -->
|
||||
<resources>
|
||||
<style name="Theme.Rhema" parent="android:Theme.Material.Light.NoActionBar">
|
||||
<item name="android:windowBackground">@color/together_ground</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in new issue
Block a user