Skip to content

Commit

Permalink
feat: declutter generated html
Browse files Browse the repository at this point in the history
  • Loading branch information
dhth committed Mar 17, 2024
1 parent 91fca49 commit d961bf6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ui/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ const (
<body class="bg-slate-900 text-xl">
<div class="container mx-auto p-4">
<h1 class="text-stone-50 text-2xl mb-4 font-bold">{{.Title}}</h1>
<table class="table-auto font-bold">
<br>
<table class="table-auto font-bold text-left">
<thead>
<tr class="text-stone-50 bg-gray-700">
<tr class="text-stone-50 bg-slate-700">
{{range .Columns -}}
<th class="px-4 py-2">{{.}}</th>
{{end -}}
Expand All @@ -40,7 +41,7 @@ const (
{{if .InSync}}
<tr class="text-green-600">
{{else}}
<tr class="text-red-600 underline">
<tr class="text-red-600">
{{end}}
{{range .Data -}}
<td class="px-4 py-2">{{.}}</td>
Expand Down Expand Up @@ -199,7 +200,9 @@ func (m model) renderCLIUI() string {
var style lipgloss.Style
var versions []string
for _, env := range m.envSequence {
versions = append(versions, m.results[sys][env])
if m.results[sys][env] != "" {
versions = append(versions, m.results[sys][env])
}
}
if allEqual(versions) {
style = inSyncStyle
Expand Down

0 comments on commit d961bf6

Please # to comment.