Tighten session list hierarchy

This commit is contained in:
OpenClaw committed 2026-03-07 21:34:23 +08:00
1 parent 3b01b1c240
commit c0d395eed2
2 files changed
+24 -24

No files matched your search

@@ -110,7 +110,7 @@ fun SessionListScreen(
Card( Card(
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
colors = CardDefaults.cardColors( colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.tertiaryContainer.copy(alpha = 0.45f), containerColor = MaterialTheme.colorScheme.surfaceContainerLow,
), ),
) { ) {
Row( Row(
@@ -121,8 +121,8 @@ fun SessionListScreen(
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
) { ) {
Column(modifier = Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(4.dp)) { Column(modifier = Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(4.dp)) {
Text("最近访问", style = MaterialTheme.typography.labelLarge) Text("最近访问", style = MaterialTheme.typography.labelMedium, color = MaterialTheme.colorScheme.onSurfaceVariant)
Text(recentSession.title, style = MaterialTheme.typography.titleMedium, maxLines = 1) Text(recentSession.title, style = MaterialTheme.typography.titleSmall, maxLines = 1)
recentSession.lastMessage.takeIf { it.isNotBlank() }?.let { summary -> recentSession.lastMessage.takeIf { it.isNotBlank() }?.let { summary ->
Text( Text(
summary, summary,
@@ -134,7 +134,7 @@ fun SessionListScreen(
} }
} }
TextButton(onClick = { onOpenSession(recentSession.id) }) { TextButton(onClick = { onOpenSession(recentSession.id) }) {
Text("继续") Text("打开")
} }
} }
} }
@@ -206,18 +206,11 @@ private fun SessionRow(
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
) )
if (session.isPinned) { Text(
StatusPill(text = "置顶", tone = StatusPillTone.Neutral) text = session.updatedAt,
} style = MaterialTheme.typography.labelSmall,
if (session.unreadCount > 0) { color = MaterialTheme.colorScheme.onSurfaceVariant,
StatusPill(text = "${session.unreadCount} 未读", tone = StatusPillTone.Info) )
}
session.streamStatus?.let { streamStatus ->
val (label, tone) = streamStatusLabelAndTone(streamStatus)
if (label != null) {
StatusPill(text = label, tone = tone)
}
}
} }
session.lastMessage.takeIf { it.isNotBlank() }?.let { summary -> session.lastMessage.takeIf { it.isNotBlank() }?.let { summary ->
@@ -232,17 +225,23 @@ private fun SessionRow(
Row( Row(
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(12.dp), horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
) { ) {
Text( if (session.isPinned) {
text = session.updatedAt, StatusPill(text = "置顶", tone = StatusPillTone.Neutral)
style = MaterialTheme.typography.bodySmall, }
color = MaterialTheme.colorScheme.onSurfaceVariant, if (session.unreadCount > 0) {
modifier = Modifier.weight(1f), StatusPill(text = "${session.unreadCount}", tone = StatusPillTone.Info)
) }
session.streamStatus?.let { streamStatus ->
val (label, tone) = streamStatusLabelAndTone(streamStatus)
if (label != null) {
StatusPill(text = label, tone = tone)
}
}
TextButton(onClick = onTogglePin) { TextButton(onClick = onTogglePin) {
Text(if (session.isPinned) "取消置顶" else "置顶") Text(if (session.isPinned) "★" else "☆")
} }
} }
} }
+1
View File
@@ -454,3 +454,4 @@ Android/iOS App
- 2026-03-07:会话页顶栏操作再收成图标化按钮:返回 / 附件 / 刷新不再显示整词文本,而是先用轻量符号按钮(← / + / ↻/⟳)表达,减少顶栏横向拥挤;后续如果需要,再统一切成正式 Material Icons 资源。 - 2026-03-07:会话页顶栏操作再收成图标化按钮:返回 / 附件 / 刷新不再显示整词文本,而是先用轻量符号按钮(← / + / ↻/⟳)表达,减少顶栏横向拥挤;后续如果需要,再统一切成正式 Material Icons 资源。
- 2026-03-07:把会话页顶栏的占位符号按钮升级为正式 Material Icons:返回改为 `ArrowBack`,附件改为 `AttachFile`,刷新/重连改为 `Refresh`,让导航头从临时占位过渡到更像成品的视觉语义。 - 2026-03-07:把会话页顶栏的占位符号按钮升级为正式 Material Icons:返回改为 `ArrowBack`,附件改为 `AttachFile`,刷新/重连改为 `Refresh`,让导航头从临时占位过渡到更像成品的视觉语义。
- 2026-03-07:继续优化附件卡片操作区:失败态仍保留前置主按钮“重新发送附件”,其余常用动作从一排横向按钮改成两行等宽次级操作(打开 / 下载 / 复制文件名 / 查看详情),避免窄屏下一排动作挤爆、主次不分。 - 2026-03-07:继续优化附件卡片操作区:失败态仍保留前置主按钮“重新发送附件”,其余常用动作从一排横向按钮改成两行等宽次级操作(打开 / 下载 / 复制文件名 / 查看详情),避免窄屏下一排动作挤爆、主次不分。
- 2026-03-07:继续收会话列表层级:最近访问卡降级成更轻的普通卡片,入口文案从“继续”改成“打开”;列表项把更新时间提到标题行右侧,底部只保留必要状态,置顶操作从文字按钮降成星标符号按钮,减少每项底部操作重量。