diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-06-29 07:09:43 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-06-29 07:09:43 +0000 |
| commit | dacb710fc4ea63baa05cc47016def3849b9db5fa (patch) | |
| tree | cc86831a3a9c950ec0909975ce77bdb485cf5589 /web/templates | |
| parent | 3b632feb80a1d6c95836981aad602e2dff4f6b63 (diff) | |
feat: add standalone task detail page for Android widget deep-links
Adds GET /task?id=xxx&source=xxx route that renders a full mobile-friendly
task detail page (session-protected). Widget task rows now open this page
when tapped. HandleUpdateTask redirects back to the page after a non-HTMX
save. Android: threads serverUrl through composable chain to TaskRow.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'web/templates')
| -rw-r--r-- | web/templates/task-detail-page.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/web/templates/task-detail-page.html b/web/templates/task-detail-page.html new file mode 100644 index 0000000..9bbf008 --- /dev/null +++ b/web/templates/task-detail-page.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>{{.Title}}</title> + <link rel="stylesheet" href="/static/css/output.css"> +</head> +<body class="min-h-screen bg-gray-900 text-slate-200 p-4"> + <div class="max-w-lg mx-auto pt-6"> + <a href="/" class="text-sm text-slate-400 hover:text-slate-200 mb-4 inline-block">← Dashboard</a> + {{if .Saved}}<p class="text-green-400 text-sm mb-3">Saved.</p>{{end}} + <div class="bg-gray-800 rounded-xl p-5 mt-2"> + <h1 class="font-semibold text-lg mb-4">{{.Title}}</h1> + {{if eq .Source "todoist"}} + <form method="post" action="/tasks/update"> + <input type="hidden" name="csrf_token" value="{{.CSRFToken}}"> + <input type="hidden" name="id" value="{{.ID}}"> + <input type="hidden" name="source" value="{{.Source}}"> + <label class="block text-sm font-medium text-slate-400 mb-1">Description</label> + <textarea name="description" class="w-full bg-gray-700 border border-gray-600 rounded-lg px-3 py-2 text-sm mb-4 h-32 text-slate-200">{{.Description}}</textarea> + <button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg text-sm font-medium">Save</button> + </form> + {{else}} + <p class="text-sm text-slate-400">Source: {{.Source}}</p> + {{end}} + </div> + </div> +</body> +</html> |
