Collapse status into settings
This commit is contained in:
1 parent
6557756e7a
commit
02196c0f6e
3 files changed
+40
-17
No files matched your search
@@ -27,7 +27,6 @@ import cn.xiaobai.openclawapp.feature.chat.ChatScreen
|
||||
import cn.xiaobai.openclawapp.feature.config.ServerConfigScreen
|
||||
import cn.xiaobai.openclawapp.feature.sessions.SessionListScreen
|
||||
import cn.xiaobai.openclawapp.feature.settings.SettingsScreen
|
||||
import cn.xiaobai.openclawapp.feature.status.StatusScreen
|
||||
import cn.xiaobai.openclawapp.platform.PlatformBackHandler
|
||||
import cn.xiaobai.openclawapp.platform.rememberAttachmentOpener
|
||||
import cn.xiaobai.openclawapp.platform.rememberAttachmentPicker
|
||||
@@ -184,12 +183,6 @@ private fun OpenClawRoot(appState: OpenClawAppState) {
|
||||
icon = { Text("💬") },
|
||||
label = { Text("会话") },
|
||||
)
|
||||
NavigationBarItem(
|
||||
selected = appState.currentRoute == AppRoute.Status,
|
||||
onClick = { appState.navigateTo(AppRoute.Status) },
|
||||
icon = { Text("📡") },
|
||||
label = { Text("状态") },
|
||||
)
|
||||
NavigationBarItem(
|
||||
selected = appState.currentRoute == AppRoute.Settings,
|
||||
onClick = { appState.navigateTo(AppRoute.Settings) },
|
||||
@@ -314,15 +307,25 @@ private fun OpenClawRoot(appState: OpenClawAppState) {
|
||||
},
|
||||
)
|
||||
|
||||
AppRoute.Status -> StatusScreen(
|
||||
AppRoute.Status -> SettingsScreen(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
serverConfig = appState.serverConfig,
|
||||
status = appState.repository.status,
|
||||
availableAgents = appState.repository.availableAgents,
|
||||
currentTheme = appState.themeMode,
|
||||
onSelectAgent = { agent ->
|
||||
coroutineScope.launch {
|
||||
appState.updateDefaultAgent(agent)
|
||||
}
|
||||
},
|
||||
onSelectTheme = appState::updateTheme,
|
||||
onDisconnect = appState::disconnect,
|
||||
)
|
||||
|
||||
AppRoute.Settings -> SettingsScreen(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
serverConfig = appState.serverConfig,
|
||||
currentModel = appState.repository.status.currentModel,
|
||||
status = appState.repository.status,
|
||||
availableAgents = appState.repository.availableAgents,
|
||||
currentTheme = appState.themeMode,
|
||||
onSelectAgent = { agent ->
|
||||
|
||||
+27
-8
@@ -14,6 +14,7 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import cn.xiaobai.openclawapp.app.AppThemeMode
|
||||
import cn.xiaobai.openclawapp.data.ServerConfig
|
||||
import cn.xiaobai.openclawapp.data.ServerStatus
|
||||
import cn.xiaobai.openclawapp.ui.LabelValueCard
|
||||
import cn.xiaobai.openclawapp.ui.SectionHeader
|
||||
import cn.xiaobai.openclawapp.ui.SelectableRowCard
|
||||
@@ -24,7 +25,7 @@ import cn.xiaobai.openclawapp.ui.StatusPillTone
|
||||
fun SettingsScreen(
|
||||
modifier: Modifier = Modifier,
|
||||
serverConfig: ServerConfig,
|
||||
currentModel: String,
|
||||
status: ServerStatus,
|
||||
availableAgents: List<String>,
|
||||
currentTheme: AppThemeMode,
|
||||
onSelectAgent: (String) -> Unit,
|
||||
@@ -101,21 +102,39 @@ fun SettingsScreen(
|
||||
}
|
||||
item {
|
||||
LabelValueCard(
|
||||
label = "当前模型",
|
||||
value = currentModel,
|
||||
supporting = "这里先展示当前连接返回的模型信息。更细的状态查看可去状态页。",
|
||||
label = "连接状态",
|
||||
value = if (status.online) "在线" else "离线",
|
||||
supporting = "这里汇总原状态页的核心诊断信息。",
|
||||
)
|
||||
}
|
||||
item {
|
||||
LabelValueCard(
|
||||
label = "当前默认 Agent",
|
||||
value = serverConfig.defaultAgent,
|
||||
label = "当前模型",
|
||||
value = status.currentModel,
|
||||
)
|
||||
}
|
||||
item {
|
||||
LabelValueCard(
|
||||
label = "默认 Agent",
|
||||
value = status.defaultAgent,
|
||||
)
|
||||
}
|
||||
item {
|
||||
LabelValueCard(
|
||||
label = "OpenClaw 版本",
|
||||
value = status.openClawVersion,
|
||||
)
|
||||
}
|
||||
item {
|
||||
LabelValueCard(
|
||||
label = "最后更新时间",
|
||||
value = status.updatedAt,
|
||||
)
|
||||
}
|
||||
item {
|
||||
StatusPill(
|
||||
text = if (serverConfig.token.isBlank()) "未连接" else "已连接",
|
||||
tone = if (serverConfig.token.isBlank()) StatusPillTone.Warning else StatusPillTone.Success,
|
||||
text = if (status.online) "已连接" else "连接异常",
|
||||
tone = if (status.online) StatusPillTone.Success else StatusPillTone.Warning,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -449,3 +449,4 @@ Android/iOS App
|
||||
- 2026-03-07:首屏远程同步提速第二轮:BFF 给 `/api/status`、`/api/agents`、`/api/sessions` 补了短 TTL 缓存,并让 `status` / `agents` 共享同一份 `openclaw status --json` 结果;热缓存下三个接口都压到了毫秒级,避免刚打开或短时间来回切页时反复打慢 CLI。
|
||||
- 2026-03-07:补一轮列表摘要降级策略:远端 session 列表不再回查摘要后,客户端刷新会优先沿用本地已有摘要;如果当前确实拿不到摘要,UI 直接留白而不是整屏显示“暂无摘要”,避免性能优化后的列表观感像异常状态。
|
||||
- 2026-03-07:按最新交互反馈继续收聊天页壳层:非会话页移除 TopAppBar,只在会话详情保留顶部导航;会话页顶栏返回/附件/刷新改成更明确的按钮,标题字号再收小;输入栏去掉“继续当前会话”说明并压缩整体高度,减少底部控件占屏。
|
||||
- 2026-03-07:信息架构继续做减法:底部导航先从三栏收成两栏(会话 / 设置),把原状态页的核心诊断信息并进设置页的“诊断信息”分组,避免低频诊断页长期占一个一级入口。
|
||||
Reference in new issue
Block a user