Fadikkop commited on
Commit
df67172
·
verified ·
1 Parent(s): bbb6721

Es hat sich nichts geändert, nichts ist interaktiv.

Browse files

```sh
cdn.tailwindcss.com should not be used in production. To use Tailwind CSS in production, install it as a PostCSS plugin or use the Tailwind CLI: https://tailwindcss.com/docs/installation cdn.tailwindcss.com:64:1711
Uncaught SyntaxError: unexpected token: keyword 'class' task-item.js:46:33
Uncaught SyntaxError: expected expression, got ')' script.js:747:10
feather: 'focus' is not a valid icon feather-icons:12:5197
Content script loaded, initializing... content.js:1719:13
Error parsing watch history: SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data
loadWatchHistory moz-extension://fbbd56d3-98cc-4e3b-a6f1-5229548dd187/content.js:794
content.js:848:17
Initial watch history loaded. content.js:936:13
Could not extract video UUID from URL content.js:1684:21
SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data content.js:574:73
[PeerTube Companion] Retrieved item "getUrlService-fadikkop-taskforge-pro.static.hf.space" from cache redirection-content-script.f3b7260b.js:1:21789
URL changed from https://fadikkop-taskforge-pro.static.hf.space/index.html to https://fadikkop-taskforge-pro.static.hf.space/index.html# content.js:869:17
Error parsing watch history: SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data
loadWatchHistory moz-extension://fbbd56d3-98cc-4e3b-a6f1-5229548dd187/content.js:794
content.js:848:17
Watch history loaded/reloaded after URL change. content.js:890:21
SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data content.js:574:73
Source-Map-Fehler: Error: request failed with status 404
Stack in the worker:networkRequest@resource://devtools/client/shared/source-map-loader/utils/network-request.js:43:9

Ressourcen-Adresse: https://unpkg.com/feather-icons
Source-Map-Adresse: feather.min.js.map
```

Files changed (3) hide show
  1. components/task-item.js +7 -25
  2. index.html +6 -5
  3. script.js +8 -6
components/task-item.js CHANGED
@@ -218,12 +218,12 @@ class TaskItem extends HTMLElement {
218
  </style>
219
  <div class="task-header">
220
  <input type="checkbox" class="task-checkbox" ${this.completed ? 'checked' : ''}>
221
- <span class="task-title">${title}</span>
222
  <div class="task-actions">
223
  <button class="focus-btn" title="Pomodoro starten">
224
  <i data-feather="clock"></i>
225
  </button>
226
- <button class="task-action" title="Bearbeiten">
227
  <i data-feather="edit-2"></i>
228
  </button>
229
  <button class="task-action" title="Löschen">
@@ -231,8 +231,7 @@ class TaskItem extends HTMLElement {
231
  </button>
232
  </div>
233
  </div>
234
-
235
- <div class="task-info">
236
  <span class="time-info">${formatTime(spentTime)} / ${formatTime(estimatedTime)}</span>
237
  <div class="tags">${tagElements}</div>
238
  </div>
@@ -271,30 +270,10 @@ class TaskItem extends HTMLElement {
271
  });
272
  }
273
  setupEventListeners() {
274
- this.shadowRoot.addEventListener('click', (e) => {
275
- const target = e.target.closest('button');
276
- if (target) {
277
- const action = target.getAttribute('title');
278
- if (action === 'Bearbeiten') {
279
- this.handleEdit(e);
280
- } else if (action === 'Löschen') {
281
- this.handleDelete(e);
282
- } else if (action === 'Pomodoro starten') {
283
- this.handleFocus(e);
284
- }
285
- }
286
- });
287
-
288
- this.shadowRoot.addEventListener('change', (e) => {
289
- if (e.target.classList.contains('task-checkbox')) {
290
- this.handleToggleComplete(e);
291
- }
292
- });
293
-
294
- // Direct event listeners for buttons
295
  const focusBtn = this.shadowRoot.querySelector('.focus-btn');
296
  const editBtn = this.shadowRoot.querySelector('.task-action[title="Bearbeiten"]');
297
  const deleteBtn = this.shadowRoot.querySelector('.task-action[title="Löschen"]');
 
298
 
299
  if (focusBtn) {
300
  focusBtn.addEventListener('click', (e) => this.handleFocus(e));
@@ -305,6 +284,9 @@ class TaskItem extends HTMLElement {
305
  if (deleteBtn) {
306
  deleteBtn.addEventListener('click', (e) => this.handleDelete(e));
307
  }
 
 
 
308
  }
309
  handleToggleComplete(e) {
310
  const completed = e.target.checked;
 
218
  </style>
219
  <div class="task-header">
220
  <input type="checkbox" class="task-checkbox" ${this.completed ? 'checked' : ''}>
221
+ <span class="task-title">${title}</span>
222
  <div class="task-actions">
223
  <button class="focus-btn" title="Pomodoro starten">
224
  <i data-feather="clock"></i>
225
  </button>
226
+ <button class="task-action" title="Bearbeiten">
227
  <i data-feather="edit-2"></i>
228
  </button>
229
  <button class="task-action" title="Löschen">
 
231
  </button>
232
  </div>
233
  </div>
234
+ <div class="task-info">
 
235
  <span class="time-info">${formatTime(spentTime)} / ${formatTime(estimatedTime)}</span>
236
  <div class="tags">${tagElements}</div>
237
  </div>
 
270
  });
271
  }
272
  setupEventListeners() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
  const focusBtn = this.shadowRoot.querySelector('.focus-btn');
274
  const editBtn = this.shadowRoot.querySelector('.task-action[title="Bearbeiten"]');
275
  const deleteBtn = this.shadowRoot.querySelector('.task-action[title="Löschen"]');
276
+ const checkbox = this.shadowRoot.querySelector('.task-checkbox');
277
 
278
  if (focusBtn) {
279
  focusBtn.addEventListener('click', (e) => this.handleFocus(e));
 
284
  if (deleteBtn) {
285
  deleteBtn.addEventListener('click', (e) => this.handleDelete(e));
286
  }
287
+ if (checkbox) {
288
+ checkbox.addEventListener('change', (e) => this.handleToggleComplete(e));
289
+ }
290
  }
291
  handleToggleComplete(e) {
292
  const completed = e.target.checked;
index.html CHANGED
@@ -6,7 +6,6 @@
6
  <title>TaskForge Pro</title>
7
  <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
9
- <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
  <script src="https://unpkg.com/feather-icons"></script>
11
  </head>
12
  <body class="bg-gray-900 text-gray-100 min-h-screen">
@@ -193,18 +192,20 @@
193
  <!-- FAB Buttons -->
194
  <div class="fixed bottom-6 right-6 flex flex-col space-y-3">
195
  <button id="focus-fab" class="p-4 bg-orange-500 hover:bg-orange-600 rounded-full shadow-lg transition transform hover:scale-110">
196
- <i data-feather="focus"></i>
197
  </button>
198
  <button id="add-task-fab" class="p-4 bg-emerald-500 hover:bg-emerald-600 rounded-full shadow-lg transition transform hover:scale-110">
199
  <i data-feather="plus"></i>
200
  </button>
201
  </div>
202
- <timeline-sidebar id="timeline-sidebar"></timeline-sidebar>
203
  <script src="components/task-item.js"></script>
204
  <script src="components/tag-item.js"></script>
205
- <script src="components/timeline-tasks.js"></script>
206
  <script src="script.js"></script>
207
- <script>feather.replace();</script>
 
 
 
 
208
  <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
209
  </body>
210
  </html>
 
6
  <title>TaskForge Pro</title>
7
  <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
 
9
  <script src="https://unpkg.com/feather-icons"></script>
10
  </head>
11
  <body class="bg-gray-900 text-gray-100 min-h-screen">
 
192
  <!-- FAB Buttons -->
193
  <div class="fixed bottom-6 right-6 flex flex-col space-y-3">
194
  <button id="focus-fab" class="p-4 bg-orange-500 hover:bg-orange-600 rounded-full shadow-lg transition transform hover:scale-110">
195
+ <i data-feather="clock"></i>
196
  </button>
197
  <button id="add-task-fab" class="p-4 bg-emerald-500 hover:bg-emerald-600 rounded-full shadow-lg transition transform hover:scale-110">
198
  <i data-feather="plus"></i>
199
  </button>
200
  </div>
 
201
  <script src="components/task-item.js"></script>
202
  <script src="components/tag-item.js"></script>
 
203
  <script src="script.js"></script>
204
+ <script>
205
+ document.addEventListener('DOMContentLoaded', function() {
206
+ feather.replace();
207
+ });
208
+ </script>
209
  <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
210
  </body>
211
  </html>
script.js CHANGED
@@ -21,6 +21,7 @@ document.addEventListener('DOMContentLoaded', () => {
21
  initializeUI();
22
  setupEventListeners();
23
  render();
 
24
  });
25
  // Local Storage
26
  function loadFromLocalStorage() {
@@ -207,7 +208,6 @@ function closeAddTaskModal() {
207
  modal.classList.add('hidden');
208
  document.getElementById('add-task-form').reset();
209
  }
210
-
211
  function handleAddTask(e) {
212
  e.preventDefault();
213
 
@@ -226,7 +226,6 @@ function handleAddTask(e) {
226
 
227
  closeAddTaskModal();
228
  }
229
-
230
  function renderModalTags() {
231
  const container = document.getElementById('modal-tags-list');
232
  container.innerHTML = state.tags.map(tag => `
@@ -389,6 +388,7 @@ function renderTasks() {
389
 
390
  document.getElementById('open-count').textContent = openTasks.length;
391
  document.getElementById('completed-count').textContent = completedTasks.length;
 
392
  // Setup drag and drop for task items
393
  setupTaskDragAndDrop();
394
 
@@ -649,8 +649,8 @@ function savePomodoroSettings() {
649
  function initializeTimeline() {
650
  // Setup drag start for task items
651
  document.addEventListener('dragstart', (e) => {
652
- if (e.target.tagName === 'TASK-ITEM') {
653
- const taskId = e.target.getAttribute('task-id');
654
  e.dataTransfer.setData('text/plain', taskId);
655
  }
656
  });
@@ -711,12 +711,10 @@ function formatTime(minutes) {
711
  const m = minutes % 60;
712
  return `${h}h${m > 0 ? ` ${m}m` : ''}`;
713
  }
714
-
715
  // Request notification permission
716
  if ('Notification' in window && Notification.permission === 'default') {
717
  Notification.requestPermission();
718
  }
719
-
720
  // New functions for task management
721
  function addTimeToTask(taskId, minutes) {
722
  const task = state.tasks.find(t => t.id === taskId);
@@ -726,6 +724,10 @@ function addTimeToTask(taskId, minutes) {
726
  render();
727
  }
728
  }
 
 
 
 
729
  function setupTaskDragAndDrop() {
730
  const openContainer = document.getElementById('open-tasks');
731
  const completedContainer = document.getElementById('completed-tasks');
 
21
  initializeUI();
22
  setupEventListeners();
23
  render();
24
+ feather.replace();
25
  });
26
  // Local Storage
27
  function loadFromLocalStorage() {
 
208
  modal.classList.add('hidden');
209
  document.getElementById('add-task-form').reset();
210
  }
 
211
  function handleAddTask(e) {
212
  e.preventDefault();
213
 
 
226
 
227
  closeAddTaskModal();
228
  }
 
229
  function renderModalTags() {
230
  const container = document.getElementById('modal-tags-list');
231
  container.innerHTML = state.tags.map(tag => `
 
388
 
389
  document.getElementById('open-count').textContent = openTasks.length;
390
  document.getElementById('completed-count').textContent = completedTasks.length;
391
+
392
  // Setup drag and drop for task items
393
  setupTaskDragAndDrop();
394
 
 
649
  function initializeTimeline() {
650
  // Setup drag start for task items
651
  document.addEventListener('dragstart', (e) => {
652
+ if (e.target.tagName === 'TASK-ITEM') {
653
+ const taskId = e.target.getAttribute('task-id');
654
  e.dataTransfer.setData('text/plain', taskId);
655
  }
656
  });
 
711
  const m = minutes % 60;
712
  return `${h}h${m > 0 ? ` ${m}m` : ''}`;
713
  }
 
714
  // Request notification permission
715
  if ('Notification' in window && Notification.permission === 'default') {
716
  Notification.requestPermission();
717
  }
 
718
  // New functions for task management
719
  function addTimeToTask(taskId, minutes) {
720
  const task = state.tasks.find(t => t.id === taskId);
 
724
  render();
725
  }
726
  }
727
+
728
+ // Fix missing global functions
729
+ window.startFocusModeWithId = startFocusModeWithId;
730
+ window.formatTime = formatTime;
731
  function setupTaskDragAndDrop() {
732
  const openContainer = document.getElementById('open-tasks');
733
  const completedContainer = document.getElementById('completed-tasks');