summaryrefslogtreecommitdiff
path: root/web/templates/partials/buckets-section.html
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-08-07 10:39:28 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-08-07 10:39:28 +0000
commiteadd17df2946a1219fdf02f2ee0a0ac19734e56d (patch)
treee0460d1cdd9c17fd47ce7cce2fe7845378d8011e /web/templates/partials/buckets-section.html
parent06450fe69ade2928deb9274bb67b7ba60d394b4f (diff)
Wire the Tasks tab into nav; fold in buckets/projects/labels and recurrence
The Tasks tab (/tabs/tasks) existed server-side and was tested, but nothing in the nav linked to it -- it was pure dead weight in the other direction. Wiring it up as the natural home for everything that was either misplaced in Settings or missing a web UI entirely: - Maintenance Buckets, Projects, and Labels moved out of Settings and into the Tasks tab (restyled from Settings' opaque slate cards to the glass/backdrop-blur look already used by the tab's chain/atom cards -- they're now embedded in index.html's page shell, not a standalone page, so the shared bg-card/bg-input classes from that shell apply). Settings keeps only what's actually settings: Passkeys, Trusted Agents, Data Sources. - Added a Recurrence section to the task-detail modal (freq/interval/ weekday form, posting to a new POST /tasks/recurrence -- the HTMX counterpart to the widget API's HandleWidgetTaskRecurrence). Native task recurrence previously had zero web UI at all, only reachable via the Android widget's RecurrenceEditDialog. Also fixed a real bug found while touching this code: HandleGetTaskDetail's source switch only had a case for "trello" -- opening any native ("doot") task's detail modal, which is most tasks in this tab, showed a blank title and description. Factored both call sites (initial GET and the re-render after a recurrence edit) through one loadTaskDetailData helper and added the missing "doot" case. Also fixed task-detail.html's styling, which was still using pre-dark-theme classes (text-gray-900 etc.) -- functionally invisible text on the modal's dark background. Verified with a throwaway local server (real templates + real DB, not the MockRenderer the unit tests use) seeded with a recurring task, a bucket, a project, and a label -- confirmed all five touched routes render 200 with the expected content, including the populated Buckets/Projects/Labels sections and a real weekly-recurrence form with the correct weekdays pre-checked. Caught and fixed a copy bug this way too ("every 2 weeklys" -> "every 2 weeks"). Not committed; deleted after use. go build ./..., go vet ./..., and go test ./... all clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL
Diffstat (limited to 'web/templates/partials/buckets-section.html')
-rw-r--r--web/templates/partials/buckets-section.html26
1 files changed, 13 insertions, 13 deletions
diff --git a/web/templates/partials/buckets-section.html b/web/templates/partials/buckets-section.html
index d2f5b7e..53b1e35 100644
--- a/web/templates/partials/buckets-section.html
+++ b/web/templates/partials/buckets-section.html
@@ -1,19 +1,19 @@
{{define "buckets-section"}}
-<div id="buckets-list" class="grid gap-4">
+<div id="buckets-list" class="grid gap-3 sm:grid-cols-2">
{{if .Buckets}}
{{range .Buckets}}
- <div class="card" id="bucket-{{.Bucket.ID}}">
+ <div class="bg-card bg-card-hover transition-colors rounded-lg border border-white/5 p-4" id="bucket-{{.Bucket.ID}}">
<div class="flex items-center justify-between gap-4 mb-3">
<div>
- <strong class="text-white">{{.Bucket.Name}}</strong>
- <span class="text-xs text-slate-400 ml-2">every {{.Bucket.CycleDays}}d, picks {{.Bucket.PickN}}</span>
+ <strong class="text-white text-sm">{{.Bucket.Name}}</strong>
+ <span class="text-xs text-white/40 ml-2">every {{.Bucket.CycleDays}}d, picks {{.Bucket.PickN}}</span>
</div>
- <button class="text-xs text-red-400 hover:text-red-300 transition-colors"
+ <button class="text-xs text-red-400/80 hover:text-red-300 transition-colors flex-shrink-0"
hx-delete="/settings/buckets/{{.Bucket.ID}}"
hx-target="#buckets-list"
hx-swap="outerHTML"
hx-confirm="Delete bucket '{{.Bucket.Name}}'? Its tasks will be kept, just unbucketed.">
- Delete Bucket
+ Delete
</button>
</div>
@@ -21,10 +21,10 @@
{{if .Items}}
{{range .Items}}
<div class="flex items-center justify-between gap-2 text-sm py-1">
- <span class="text-slate-200">{{.Content}}</span>
+ <span class="text-white/80">{{.Content}}</span>
<div class="flex items-center gap-3 flex-shrink-0">
- <span class="text-[10px] uppercase tracking-wider {{if eq .BucketState "active"}}text-green-400{{else}}text-slate-500{{end}}">{{.BucketState}}</span>
- <button class="text-xs text-red-400/70 hover:text-red-300 transition-colors"
+ <span class="text-[10px] uppercase tracking-wider {{if eq .BucketState "active"}}text-green-400{{else}}text-white/30{{end}}">{{.BucketState}}</span>
+ <button class="text-xs text-red-400/60 hover:text-red-300 transition-colors"
hx-post="/settings/buckets/items/remove"
hx-vals='{"task_id": "{{.ID}}"}'
hx-target="#buckets-list"
@@ -35,19 +35,19 @@
</div>
{{end}}
{{else}}
- <p class="text-xs text-slate-500 italic">Pool is empty.</p>
+ <p class="text-xs text-white/40 italic">Pool is empty.</p>
{{end}}
</div>
<form class="flex gap-2" hx-post="/settings/buckets/{{.Bucket.ID}}/items" hx-target="#buckets-list" hx-swap="outerHTML" hx-on::after-request="if(event.detail.successful) this.reset()">
<input type="text" name="title" placeholder="Add a pool item..." required
- class="flex-1 bg-slate-950 border border-white/10 rounded-lg px-3 py-1.5 text-sm focus:ring-1 focus:ring-blue-500 outline-none">
- <button type="submit" class="text-sm bg-slate-800 hover:bg-slate-700 text-white px-3 py-1.5 rounded-lg transition-colors">Add</button>
+ class="flex-1 bg-input border border-white/20 rounded-lg px-3 py-1.5 text-sm text-white placeholder-white/50 outline-none focus:ring-1 focus:ring-white/30">
+ <button type="submit" class="text-sm bg-white/10 hover:bg-white/20 text-white px-3 py-1.5 rounded-lg transition-colors">Add</button>
</form>
</div>
{{end}}
{{else}}
- <div class="card text-center text-slate-500 py-10">No maintenance buckets yet.</div>
+ <div class="bg-card rounded-lg border border-white/5 text-center text-white/40 py-10 sm:col-span-2">No maintenance buckets yet.</div>
{{end}}
</div>
{{end}}