fix: move skill source badge beside install button in hub cards (#502)

The hub card UI is rendered by the local private HubSkillCard in SkillsScreen.kt (not the unused components/HubSkillsTab.kt copy). Moved SourceBadge out of the top-right name row to the left of the Install button in the card footer (left-aligned source, right-aligned action), tying the skill origin (hub/clawhub/etc) to the install action.
This commit is contained in:
M57 authored and GitHub committed 2026-07-08 23:09:19 +03:00
1 parent cbbda06157
commit 793ab89c14
1 file changed
+9 -13
@@ -683,11 +683,7 @@ private fun HubSkillCard(
Column( Column(
modifier = Modifier.fillMaxWidth().padding(16.dp), modifier = Modifier.fillMaxWidth().padding(16.dp),
) { ) {
// ── Top row: name + source badge ── // ── Top row: name ──
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
) {
Text( Text(
text = hubSkill.name, text = hubSkill.name,
style = style =
@@ -696,13 +692,8 @@ private fun HubSkillCard(
), ),
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f), modifier = Modifier.fillMaxWidth(),
) )
hubSkill.source?.let { source ->
Spacer(modifier = Modifier.width(6.dp))
SourceBadge(source = source)
}
}
// ── Category ── // ── Category ──
hubSkill.category?.let { cat -> hubSkill.category?.let { cat ->
@@ -726,12 +717,17 @@ private fun HubSkillCard(
) )
} }
// ── Install button ── // ── Source badge + Install button ──
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Row( Row(
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.End, verticalAlignment = Alignment.CenterVertically,
) { ) {
hubSkill.source?.let { source ->
SourceBadge(source = source)
Spacer(modifier = Modifier.width(8.dp))
}
Spacer(modifier = Modifier.weight(1f))
Button( Button(
onClick = onInstall, onClick = onInstall,
enabled = !isInstalling, enabled = !isInstalling,