Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,16 @@ function renderTasks() {
<button class="task-btn task-btn-info restore-task-btn" data-id="${t.id}" title="Restore">Restore</button>
<button class="task-btn task-btn-danger delete-task-btn" data-id="${t.id}" title="Permanent Delete">Delete</button>`;

let priorityClass = 'pill-blue';
let priorityLabel = '🔵 Low';
if (t.priority === 'high') {
priorityClass = 'pill-red';
priorityLabel = '🔴 High';
} else if (t.priority === 'medium') {
priorityClass = 'pill-amber';
priorityLabel = '🟡 Medium';
}

html += `
<div class="task-item ${isUrgent ? 'urgent' : ''} ${isDone ? 'done' : ''}" data-id="${t.id}">
<div class="task-check ${isDone ? 'done' : ''}"></div>
Expand All @@ -521,6 +531,7 @@ function renderTasks() {
<div class="task-meta">
<span class="task-pill ${isDone ? 'pill-green' : (isUrgent ? 'pill-red' : 'pill-amber')}">${isDone ? 'Done' : 'Due ' + formatDate(t.due_at)}</span>
<span class="task-pill ${pillClass}">${sub.short_code}</span>
<span class="task-pill ${priorityClass}">${priorityLabel}</span>
</div>
</div>
<div class="task-actions">
Expand Down