rustploy-gui 0.1.21

Rustploy — desktop client (glacier-ui) for the Rustploy PaaS daemon
// Template "fragment": dois nós de topo (o slot vazio e o card) — o glacier-ui
// (0.4.12+) embrulha múltiplas raízes num Fragment e aplica os filhos no pai,
// then o par if/else vira dois irmãos do grid, sem nó wrapper.
component {
  props {
    prop(name = id)
    prop(name = name)
    prop(name = service_count)
    prop(name = running_count)
    prop(name = description)
    prop(name = can_delete)
    prop(name = filler)
  }

  if @filler == "1" {
    column(class = u-fill)
  } else {
    column(class = card) {
      row(class = card__head) {
        text(class = card__name, content = "@name")
      }

      text(
        class = u-muted,
        size = 11,
        content = "@service_count serviço(s) · @running_count rodando",
      )

      text(class = u-muted, content = "@description")
      hr

      // Ações empilhadas: um botão fill disputando a linha com
      // texto/botão fica torto quando o card está estreito.
      button(class = "card__action card__action--open", on_click = open_project:@id, disabled = @busy_open_project, text = "Abrir  ›")

      button(
        class = "card__action card__action--danger",
        if = @can_delete,
        equals = 1,
        on_click = delete_project:@id,
        disabled = @busy_delete_project,
        text = Remover,
      )

      text(
        class = u-muted,
        if = @can_delete,
        not_equals = 1,
        content = "Não removível: tem serviços",
      )
    }
  }
}