clocktopus 1.6.10 → 1.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -860,7 +860,7 @@ export function indexPage() {
860
860
  }
861
861
  const jira = s.jiraTicket || '-';
862
862
  const deleteBtn = s.completedAt
863
- ? '<button class="delete-btn" title="Delete entry" onclick="deleteSession(\'' + escapeHtml(s.id) + '\')">&times;</button>'
863
+ ? '<button class="delete-btn" title="Delete entry" data-delete-id="' + escapeHtml(s.id) + '">&times;</button>'
864
864
  : '';
865
865
  return '<tr>' +
866
866
  '<td>' + escapeHtml(s.description) + '</td>' +
@@ -904,6 +904,12 @@ export function indexPage() {
904
904
  }
905
905
  }
906
906
 
907
+ document.addEventListener('click', function(e) {
908
+ const btn = e.target.closest && e.target.closest('[data-delete-id]');
909
+ if (!btn) return;
910
+ deleteSession(btn.getAttribute('data-delete-id'));
911
+ });
912
+
907
913
  function escapeHtml(str) {
908
914
  const div = document.createElement('div');
909
915
  div.textContent = str;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clocktopus",
3
- "version": "1.6.10",
3
+ "version": "1.6.11",
4
4
  "description": "Time-tracking automation for Clockify with idle monitoring, Jira integration, Google Calendar sync, CLI, web dashboard, and desktop app.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",