summaryrefslogtreecommitdiff
path: root/web/templates/partials/task-detail.html
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-08-12 23:35:47 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-08-12 23:35:47 +0000
commit2509dde6aa372a505b186657706f4d21bd391807 (patch)
treee4147991747b8dd14d0b8654b2b8e50717b666bd /web/templates/partials/task-detail.html
parent3e8ad60431d6cc783f9f7c555bfde5db54ebec75 (diff)
Add task title editing/deletion, timeline click-to-open, widget app launch
Task-detail modal was description-only with no delete affordance; HandleUpdateTask now saves the title too and a Delete button hits a new DELETE /tasks/{id} route backed by store.DeleteNativeTask, which repairs chain_position/unlocks the successor when the deleted task belongs to a chain. Timeline tab task/card/gtask rows now open the same detail modal as the Tasks tab. Android widget's "TODAY" header is now a tap target that launches DashboardActivity, since nothing previously opened the full app from the widget.
Diffstat (limited to 'web/templates/partials/task-detail.html')
-rw-r--r--web/templates/partials/task-detail.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/web/templates/partials/task-detail.html b/web/templates/partials/task-detail.html
index 135c38f..abcc5b9 100644
--- a/web/templates/partials/task-detail.html
+++ b/web/templates/partials/task-detail.html
@@ -1,15 +1,28 @@
{{define "task-detail"}}
<div class="p-4">
- <h3 class="font-semibold text-white mb-3">{{.Title}}</h3>
<form hx-post="/tasks/update" hx-swap="none" hx-on::after-request="if(event.detail.successful) { closeTaskModal(); htmx.trigger(document.body, 'refresh-tasks'); }">
<input type="hidden" name="id" value="{{.ID}}">
<input type="hidden" name="source" value="{{.Source}}">
+ <label class="block text-sm font-medium text-white/70 mb-1">Title</label>
+ <input type="text" name="title" value="{{.Title}}" required
+ class="w-full bg-input border border-white/20 rounded-lg px-3 py-2 text-sm font-semibold text-white placeholder-white/50 mb-3">
<label class="block text-sm font-medium text-white/70 mb-1">Description</label>
<textarea name="description" class="w-full bg-input border border-white/20 rounded-lg px-3 py-2 text-sm text-white placeholder-white/50 mb-3 h-32">{{.Description}}</textarea>
<button type="submit" class="w-full bg-white/20 hover:bg-white/30 text-white px-4 py-2 rounded-lg text-sm font-medium">Save</button>
</form>
{{if .IsDoot}}
+ <button type="button"
+ class="w-full mt-3 bg-red-500/10 hover:bg-red-500/20 text-red-300 px-4 py-2 rounded-lg text-sm font-medium"
+ hx-delete="/tasks/{{.ID}}?source={{.Source}}"
+ hx-confirm="Delete this task? This can't be undone."
+ hx-swap="none"
+ hx-on::after-request="if(event.detail.successful) { closeTaskModal(); htmx.trigger(document.body, 'refresh-tasks'); }">
+ Delete Task
+ </button>
+ {{end}}
+
+ {{if .IsDoot}}
<div class="mt-4 pt-4 border-t border-white/10">
<h4 class="text-sm font-medium text-white/70 mb-2">Recurrence</h4>
{{if .RecurrenceFreq}}