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