diff options
Diffstat (limited to 'web/templates/partials')
| -rw-r--r-- | web/templates/partials/shopping-tab.html | 6 | ||||
| -rw-r--r-- | web/templates/partials/timeline-tab.html | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/web/templates/partials/shopping-tab.html b/web/templates/partials/shopping-tab.html index 1f589e5..f247f3d 100644 --- a/web/templates/partials/shopping-tab.html +++ b/web/templates/partials/shopping-tab.html @@ -38,9 +38,9 @@ <li class="flex items-center gap-3 p-3 bg-card bg-card-hover transition-colors rounded-lg border border-white/5 {{if .Checked}}opacity-50{{end}}"> <input type="checkbox" {{if .Checked}}checked{{end}} hx-post="/shopping/toggle" - hx-vals='{"id":"{{.ID}}","source":"{{.Source}}","checked":{{if .Checked}}false{{else}}true{{end}},"name":"{{.Name}}"}' - hx-target="closest li" - hx-swap="outerHTML" + hx-vals='{"id":"{{.ID}}","source":"{{.Source}}","checked":{{if .Checked}}false{{else}}true{{end}}}' + hx-target="#tab-content" + hx-swap="innerHTML" class="h-5 w-5 rounded bg-black/40 border-white/30 text-green-500 focus:ring-white/30 cursor-pointer flex-shrink-0"> <span class="flex-1 {{if .Checked}}line-through text-white/40{{else}}text-white{{end}}">{{.Name}}</span> {{if .Quantity}}<span class="text-white/50 text-sm">{{.Quantity}}</span>{{end}} diff --git a/web/templates/partials/timeline-tab.html b/web/templates/partials/timeline-tab.html index 5f32530..8486ab7 100644 --- a/web/templates/partials/timeline-tab.html +++ b/web/templates/partials/timeline-tab.html @@ -83,12 +83,15 @@ class="mt-1 h-5 w-5 rounded bg-black/40 border-white/30 text-white/80 focus:ring-white/30 cursor-pointer flex-shrink-0"> {{end}} + {{/* Only show time if it's not midnight (12:00 AM = all-day/no specific time) */}} + {{if or (ne .Time.Hour 0) (ne .Time.Minute 0)}} <div class="flex flex-col items-center min-w-[60px] text-xs text-white/50 pt-0.5"> <span class="font-medium text-white/80">{{.Time.Format "3:04 PM"}}</span> {{if .EndTime}} <span class="text-[10px] opacity-70">{{.EndTime.Format "3:04 PM"}}</span> {{end}} </div> + {{end}} <div class="flex-1 min-w-0"> <div class="flex items-start justify-between gap-2"> @@ -106,16 +109,21 @@ <p class="text-xs text-white/50 mt-1 line-clamp-2">{{.Description}}</p> {{end}} + {{/* Only show type badge for non-task items, and done badge if completed */}} + {{if or (ne .Type "task") .IsCompleted}} <div class="flex items-center gap-2 mt-2"> + {{if ne .Type "task"}} <span class="text-[10px] px-1.5 py-0.5 rounded bg-white/10 text-white/60 uppercase tracking-wider"> {{.Type}} </span> + {{end}} {{if .IsCompleted}} <span class="text-[10px] px-1.5 py-0.5 rounded bg-green-500/20 text-green-400 uppercase tracking-wider"> done </span> {{end}} </div> + {{end}} </div> </div> </div> |
