diff options
Diffstat (limited to 'web/templates/partials')
| -rw-r--r-- | web/templates/partials/planning-tab.html | 35 | ||||
| -rw-r--r-- | web/templates/partials/tasks-tab.html | 34 |
2 files changed, 57 insertions, 12 deletions
diff --git a/web/templates/partials/planning-tab.html b/web/templates/partials/planning-tab.html index bfb3eee..ae48f33 100644 --- a/web/templates/partials/planning-tab.html +++ b/web/templates/partials/planning-tab.html @@ -93,18 +93,29 @@ <form hx-post="/unified-add" hx-swap="none" hx-on::after-request="if(event.detail.successful) { this.reset(); htmx.trigger(document.body, 'refresh-tasks'); }"> - <div class="flex gap-2"> - <input type="text" - name="title" - placeholder="Add a task for today..." - class="flex-1 bg-black/40 border border-white/20 rounded-lg px-3 py-2 text-sm text-white placeholder-white/50" - required> - <input type="hidden" name="due_date" value="{{.Today}}"> - <input type="hidden" name="source" value="todoist"> - <button type="submit" - class="bg-white/20 hover:bg-white/30 text-white px-4 py-2 rounded-lg text-sm font-medium"> - Add - </button> + <div class="space-y-3"> + <div class="flex gap-2"> + <input type="text" + name="title" + placeholder="Add a task for today..." + class="flex-1 bg-black/40 border border-white/20 rounded-lg px-3 py-2 text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-white/30 focus:border-transparent" + required> + <input type="hidden" name="due_date" value="{{.Today}}"> + <input type="hidden" name="source" value="todoist"> + <button type="submit" + class="bg-white/20 hover:bg-white/30 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors"> + Add + </button> + </div> + {{if .Projects}} + <select name="project_id" + class="w-full bg-black/40 border border-white/20 rounded-lg px-3 py-2 text-sm text-white focus:ring-2 focus:ring-white/30 focus:border-transparent"> + <option value="">Select project (optional)...</option> + {{range .Projects}} + <option value="{{.ID}}">{{.Name}}</option> + {{end}} + </select> + {{end}} </div> </form> </div> diff --git a/web/templates/partials/tasks-tab.html b/web/templates/partials/tasks-tab.html index 9e030e4..520bf0d 100644 --- a/web/templates/partials/tasks-tab.html +++ b/web/templates/partials/tasks-tab.html @@ -4,6 +4,40 @@ hx-trigger="refresh-tasks from:body" hx-target="#tab-content" hx-swap="innerHTML"> + + <!-- Quick Add Form (Todoist) --> + {{if .Projects}} + <details class="mb-6"> + <summary class="cursor-pointer text-sm text-white/70 hover:text-white font-medium transition-colors mb-2"> + + Quick Add Todoist Task + </summary> + <form hx-post="/tasks" + hx-target="#tab-content" + hx-swap="innerHTML" + class="mt-3 space-y-3 bg-black/30 p-4 rounded-lg border border-white/10 max-w-md"> + + <input type="text" + name="content" + placeholder="Task content" + required + class="w-full px-3 py-2 bg-black/40 border border-white/20 rounded-lg text-sm text-white placeholder-white/50 focus:ring-2 focus:ring-white/30 focus:border-transparent"> + + <select name="project_id" + class="w-full px-3 py-2 bg-black/40 border border-white/20 rounded-lg text-sm text-white focus:ring-2 focus:ring-white/30 focus:border-transparent"> + <option value="">Select project (optional)...</option> + {{range .Projects}} + <option value="{{.ID}}">{{.Name}}</option> + {{end}} + </select> + + <button type="submit" + class="w-full bg-white/10 hover:bg-white/20 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors border border-white/10"> + Add Task + </button> + </form> + </details> + {{end}} + <!-- Tasks List --> {{if .Atoms}} <div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3"> |
