diff --git a/frontend/index.html b/frontend/index.html index 07f9e10..3c29d3c 100755 --- a/frontend/index.html +++ b/frontend/index.html @@ -454,7 +454,7 @@ return state.allEntries.find(entry => entry.date === date); } - function renderCalendar(year, month, selectedDate, hasDataDates, onClick) { + function renderCalendar(year, month, selectedDate, hasDataDates) { const firstDay = new Date(year, month, 1); const lastDay = new Date(year, month + 1, 0); const startDay = firstDay.getDay(); @@ -494,45 +494,96 @@ } function renderTasksView() { - const dateTasks = getTasksByDate(state.selectedDate); - const tasksToShow = state.selectedTask ? [state.selectedTask] : dateTasks; - - const taskDates = state.allTasks.map(t => t.created_at.split('T')[0]); const current = state.currentCalendar || new Date(); - const calendarHtml = renderCalendar(current.getFullYear(), current.getMonth(), state.selectedDate, taskDates); + + // 任务列表视图 + if (!state.selectedTask) { + return ` +
📅 ${state.selectedDate} 没有任务
-点击日历选择其他日期
+暂无任务
点击日历查看当日的任务记录
+${state.selectedDate} 暂无记录
+点击日历选择日期查看日记
点击日历选择其他日期