ui: move server test button to top row, free address space
Row 1: checkbox + name + test/edit/delete. Row 2: full URL + key + move-up/move-down only — more room for the link. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -399,10 +399,17 @@ private fun ServerRow(
|
|||||||
StatusBadge("停用", MaterialTheme.colorScheme.onSurfaceVariant)
|
StatusBadge("停用", MaterialTheme.colorScheme.onSurfaceVariant)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
IconButton(
|
||||||
|
onClick = { if (!testing) app.appScope.launch { testing = true; testMsg = testPush(app, server); testing = false } },
|
||||||
|
enabled = !testing,
|
||||||
|
) {
|
||||||
|
if (testing) CircularProgressIndicator(Modifier.size(18.dp), strokeWidth = 2.dp)
|
||||||
|
else Icon(Icons.AutoMirrored.Filled.Send, "测试")
|
||||||
|
}
|
||||||
IconButton(onClick = onEdit) { Icon(Icons.Filled.Edit, "编辑") }
|
IconButton(onClick = onEdit) { Icon(Icons.Filled.Edit, "编辑") }
|
||||||
IconButton(onClick = onDelete) { Icon(Icons.Filled.Delete, "删除") }
|
IconButton(onClick = onDelete) { Icon(Icons.Filled.Delete, "删除") }
|
||||||
}
|
}
|
||||||
// 第二行:地址 + key + 测试/上移/下移
|
// 第二行:地址 + key + 上移/下移
|
||||||
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(top = 2.dp)) {
|
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(top = 2.dp)) {
|
||||||
Column(Modifier.weight(1f).padding(start = 36.dp)) {
|
Column(Modifier.weight(1f).padding(start = 36.dp)) {
|
||||||
Text(
|
Text(
|
||||||
@@ -418,13 +425,6 @@ private fun ServerRow(
|
|||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
IconButton(
|
|
||||||
onClick = { if (!testing) app.appScope.launch { testing = true; testMsg = testPush(app, server); testing = false } },
|
|
||||||
enabled = !testing,
|
|
||||||
) {
|
|
||||||
if (testing) CircularProgressIndicator(Modifier.size(18.dp), strokeWidth = 2.dp)
|
|
||||||
else Icon(Icons.AutoMirrored.Filled.Send, "测试")
|
|
||||||
}
|
|
||||||
IconButton(onClick = onMoveUp, enabled = !isFirst) { Icon(Icons.Filled.KeyboardArrowUp, "上移") }
|
IconButton(onClick = onMoveUp, enabled = !isFirst) { Icon(Icons.Filled.KeyboardArrowUp, "上移") }
|
||||||
IconButton(onClick = onMoveDown, enabled = !isLast) { Icon(Icons.Filled.KeyboardArrowDown, "下移") }
|
IconButton(onClick = onMoveDown, enabled = !isLast) { Icon(Icons.Filled.KeyboardArrowDown, "下移") }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user