WIP components (as built)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 15:51:57 -04:00
1 parent 1095ed2b9d
commit 7e4f275f0a
80 files changed
+2754 -132

No files matched your search

+5 -5
View File
@@ -10,7 +10,7 @@ import (
"mujicaui/theme"
)
// IncidentStatus is where an incident stands. The zero value is IncidentInvestigating.
// IncidentStatus tracks investigation; zero means IncidentInvestigating.
type IncidentStatus int
const (
@@ -20,7 +20,7 @@ const (
IncidentResolved
)
// IncidentImpact is how badly users are affected. The zero value is ImpactNone.
// IncidentImpact tracks severity; zero means ImpactNone.
type IncidentImpact int
const (
@@ -75,8 +75,8 @@ func IncidentCard(c *ui.Context, inc Incident) *ui.Element {
agentCaption(c, fmt.Sprintf(msg(c, "incident_card.started"), inc.Started.Format("2006-01-02 15:04")))
}
})
for i, up := range inc.Updates {
incidentUpdate(c, k, up, i == len(inc.Updates)-1)
if len(inc.Updates) > 0 {
agentRows(c, len(inc.Updates), func(i int) { incidentUpdate(c, k, inc.Updates[i], i == len(inc.Updates)-1) }).Shrink(1).MaxHeight(320)
}
})
return card
@@ -94,7 +94,7 @@ func incidentUpdate(c *ui.Context, k theme.Tokens, up IncidentUpdate, last bool)
}
p.FillPath(internal.Diamond(cx, cy, 9), k.Ornament)
})
ui.Column(c).Grow(1).Shrink(1).Gap(u / 2).Padding(0, 0, u*2, 0).Children(func() {
ui.Column(c).Grow(1).Shrink(1).Gap(u/2).Padding(0, 0, u*2, 0).Children(func() {
ui.Row(c).Gap(u * 2).Children(func() {
ui.Text(c, incidentStatusWord(c, up.Status)).FontWeight(600)
if !up.At.IsZero() {