summaryrefslogtreecommitdiff
path: root/web/templates
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-26 17:00:30 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-26 17:00:30 -1000
commitbbf12fc441ca36c423e865107d34df178e3d26de (patch)
tree44525ff1c846c1b4099f4c08c6ce88f6028ea5d2 /web/templates
parentfd2524eacd51f523998734f869b3343441e55b93 (diff)
Fix multiple UI issues and shopping completion bug
- #54: Fix shopping item completion - now works for all sources (trello, plantoeat, user) with state stored in local DB - #48: Hide 12:00am times in timeline (all-day items) - #49: Remove "Task" type label from timeline items for cleaner UI - #51: Combine multiple PlanToEat meals for same date+mealType - #52: Change Conditions tab to standard link to standalone page Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'web/templates')
-rw-r--r--web/templates/index.html9
-rw-r--r--web/templates/partials/shopping-tab.html6
-rw-r--r--web/templates/partials/timeline-tab.html8
3 files changed, 13 insertions, 10 deletions
diff --git a/web/templates/index.html b/web/templates/index.html
index 1dc433b..6bc513c 100644
--- a/web/templates/index.html
+++ b/web/templates/index.html
@@ -64,14 +64,9 @@
onclick="setActiveTab(this)">
🛒 Shopping
</button>
- <button
- class="tab-button {{if eq .ActiveTab "conditions"}}tab-button-active{{end}}"
- hx-get="/tabs/conditions"
- hx-target="#tab-content"
- hx-push-url="?tab=conditions"
- onclick="setActiveTab(this)">
+ <a href="/conditions" class="tab-button">
🌋 Conditions
- </button>
+ </a>
<!-- Details Dropdown -->
<div class="relative" id="details-dropdown">
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>