feat: add custom task recurrence options
ci / docker (push) Successful in 5m27s

This commit is contained in:
2026-09-08 08:53:02 +08:00
parent 2eca978820
commit 0dd67f2824
5 changed files with 35 additions and 3 deletions
+2 -1
View File
@@ -145,14 +145,15 @@ async function submitTaskCompose() {
const taskTitle = composeTitle.value.trim()
if (!taskTitle || !composeListId.value) return
try {
const rrule = composeRepeat.value === 'none' ? null : repeatRrule(composeRepeat.value, composeRepeatConfig.value)
const task = await api('/tasks', { method: 'POST', body: JSON.stringify({
title: taskTitle,
list_id: composeListId.value,
due_at: fromDateTimeLocal(composeDueAt.value),
priority: composePriority.value,
description: composeDescription.value,
rrule,
}) })
if (composeRepeat.value !== 'none') await api('/recurrences', { method: 'POST', body: JSON.stringify({ task_id: task.id, rrule: repeatRrule(composeRepeat.value, composeRepeatConfig.value) }) })
if (isTaskView(activeView.value)) {
tasks.value.push(task)
totalTasks.value = nextTotalAfterLocalTaskAdd(totalTasks.value)