diff --git a/public/app.mjs b/public/app.mjs index a7e891a..78fc9aa 100644 --- a/public/app.mjs +++ b/public/app.mjs @@ -262,16 +262,21 @@ function make_entry_row(entry, children_map) { const type_chip = row.querySelector('.entry-type-chip'); const et = state.entry_types.find(t => t.id === entry.type); type_chip.textContent = et ? et.title : entry.type; + type_chip.classList.add('clickable'); type_chip.addEventListener('click', (e) => { e.stopPropagation(); navigate('type/' + entry.type); }); show(type_chip); const status_el = row.querySelector('.task-status'); status_el.textContent = entry.status; status_el.dataset.val = entry.status; + status_el.classList.add('clickable'); + status_el.addEventListener('click', (e) => { e.stopPropagation(); set_filter('filter_status', entry.status); }); const priority_el = row.querySelector('.task-priority'); priority_el.textContent = entry.priority; priority_el.dataset.val = entry.priority; + priority_el.classList.add('clickable'); + priority_el.addEventListener('click', (e) => { e.stopPropagation(); set_filter('filter_priority', entry.priority); }); const main_el = row.querySelector('.task-main'); main_el.classList.add('clickable'); @@ -761,15 +766,17 @@ function render_entry_detail(container) { } const status_el = document.createElement('span'); - status_el.className = 'task-status'; + status_el.className = 'task-status clickable'; status_el.textContent = entry.status; status_el.dataset.val = entry.status; + status_el.addEventListener('click', () => { state.filter_status = entry.status; navigate('type/' + entry.type); }); meta.appendChild(status_el); const priority_el = document.createElement('span'); - priority_el.className = 'task-priority'; + priority_el.className = 'task-priority clickable'; priority_el.textContent = entry.priority; priority_el.dataset.val = entry.priority; + priority_el.addEventListener('click', () => { state.filter_priority = entry.priority; navigate('type/' + entry.type); }); meta.appendChild(priority_el); for (const tag of entry.tags) { diff --git a/public/style.css b/public/style.css index 58ccbaf..62ee1e6 100644 --- a/public/style.css +++ b/public/style.css @@ -192,8 +192,8 @@ main { padding: 1.25rem; } color: #8899cc; } -.clickable-tag { cursor: pointer; } -.clickable-tag:hover { background: #363650; color: #aabbee; } +.clickable-tag, .clickable { cursor: pointer; } +.clickable-tag:hover, .clickable:hover { filter: brightness(1.3); } .btn-expand { width: 1.25rem; @@ -448,7 +448,6 @@ dialog input:focus, dialog textarea:focus, dialog select:focus { margin-bottom: 0.2rem; display: inline-block; width: fit-content; - cursor: pointer; } /* Type section in entry dialog */