Spaces:
Running
Jetzt sieht es so aus
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
feather: 'focus' is not a valid icon feather-icons:12:5197
Uncaught ReferenceError: taskId is not defined
render https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:243
attributeChangedCallback https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:26
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:363
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:361
render https://fadikkop-taskforge-pro.static.hf.space/script.js:344
<anonymous> https://fadikkop-taskforge-pro.static.hf.space/script.js:23
EventListener.handleEvent* https://fadikkop-taskforge-pro.static.hf.space/script.js:19
task-item.js:243:52
Uncaught ReferenceError: taskId is not defined
render https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:243
attributeChangedCallback https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:26
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:364
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:361
render https://fadikkop-taskforge-pro.static.hf.space/script.js:344
<anonymous> https://fadikkop-taskforge-pro.static.hf.space/script.js:23
EventListener.handleEvent* https://fadikkop-taskforge-pro.static.hf.space/script.js:19
task-item.js:243:52
Uncaught ReferenceError: taskId is not defined
render https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:243
connectedCallback https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:11
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:365
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:361
render https://fadikkop-taskforge-pro.static.hf.space/script.js:344
<anonymous> https://fadikkop-taskforge-pro.static.hf.space/script.js:23
EventListener.handleEvent* https://fadikkop-taskforge-pro.static.hf.space/script.js:19
task-item.js:243:52
Uncaught ReferenceError: taskId is not defined
render https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:243
attributeChangedCallback https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:26
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:363
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:361
render https://fadikkop-taskforge-pro.static.hf.space/script.js:344
<anonymous> https://fadikkop-taskforge-pro.static.hf.space/script.js:23
EventListener.handleEvent* https://fadikkop-taskforge-pro.static.hf.space/script.js:19
task-item.js:243:52
Uncaught ReferenceError: taskId is not defined
render https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:243
attributeChangedCallback https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:26
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:364
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:361
render https://fadikkop-taskforge-pro.static.hf.space/script.js:344
<anonymous> https://fadikkop-taskforge-pro.static.hf.space/script.js:23
EventListener.handleEvent* https://fadikkop-taskforge-pro.static.hf.space/script.js:19
task-item.js:243:52
Uncaught ReferenceError: taskId is not defined
render https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:243
connectedCallback https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:11
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:365
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:361
render https://fadikkop-taskforge-pro.static.hf.space/script.js:344
<anonymous> https://fadikkop-taskforge-pro.static.hf.space/script.js:23
EventListener.handleEvent* https://fadikkop-taskforge-pro.static.hf.space/script.js:19
task-item.js:243:52
Uncaught ReferenceError: taskId is not defined
render https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:243
attributeChangedCallback https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:26
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:363
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:361
render https://fadikkop-taskforge-pro.static.hf.space/script.js:344
<anonymous> https://fadikkop-taskforge-pro.static.hf.space/script.js:23
EventListener.handleEvent* https://fadikkop-taskforge-pro.static.hf.space/script.js:19
task-item.js:243:52
Uncaught ReferenceError: taskId is not defined
render https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:243
attributeChangedCallback https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:26
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:364
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:361
render https://fadikkop-taskforge-pro.static.hf.space/script.js:344
<anonymous> https://fadikkop-taskforge-pro.static.hf.space/script.js:23
EventListener.handleEvent* https://fadikkop-taskforge-pro.static.hf.space/script.js:19
task-item.js:243:52
Uncaught ReferenceError: taskId is not defined
render https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:243
connectedCallback https://fadikkop-taskforge-pro.static.hf.space/components/task-item.js:11
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:365
renderTasks https://fadikkop-taskforge-pro.static.hf.space/script.js:361
render https://fadikkop-taskforge-pro.static.hf.space/script.js:344
<anonymous> https://fadikkop-taskforge-pro.static.hf.space/script.js:23
EventListener.handleEvent* https://fadikkop-taskforge-pro.static.hf.space/script.js:19
task-item.js:243:52
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
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
[PeerTube Companion] Retrieved item "getUrlService-fadikkop-taskforge-pro.static.hf.space" from cache redirection-content-script.f3b7260b.js:1:21789
```
```html
<div class="bg-gray-800 rounded-xl shadow-lg">
<div class="p-4 border-b border-gray-700">
<h3 class="text-lg font-semibold flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-circle text-orange-500 mr-2"><circle cx="12" cy="12" r="10"></circle></svg>
Offene Aufgaben (<span id="open-count">3</span>)
</h3>
</div>
<div id="open-tasks" class="p-4 space-y-3 max-h-96 overflow-y-auto"><task-item task-id="1764499641261" completed="false"></task-item><task-item task-id="1764499848322" completed="false"></task-item><task-item task-id="1764500031386" completed="false"></task-item></div>
</div>
```
Sorge dafür, dass die offenen Aufgaben korrekt geladen und angezeigt werden! Überlege, wo der Fehler liegen kann und löse ihn. Ich möchte außerdem eine Lösung dafür, dass ich schlecht aus der Übersicht Aufgaben in die Timeline ziehen kann. Mache die Timeline also als eine sidebar, in die ich die Aufgaben per drag and drop ziehen kann
- components/task-item.js +6 -7
- components/timeline-sidebar.js +154 -0
- index.html +2 -2
- script.js +17 -6
|
@@ -239,15 +239,14 @@ this.shadowRoot.innerHTML = `
|
|
| 239 |
<div class="progress-bar">
|
| 240 |
<div class="progress-fill" style="width: ${progress}%"></div>
|
| 241 |
</div>
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
<input type="
|
| 246 |
-
<input type="number" value="${Math.floor(estimatedTime / 60)}" id="edit-hours-${taskId}"
|
| 247 |
placeholder="h" min="0" max="24" style="width: 60px">
|
| 248 |
-
<input type="number" value="${estimatedTime % 60}" id="edit-minutes-${taskId}"
|
| 249 |
placeholder="m" min="0" max="59" step="15" style="width: 60px">
|
| 250 |
-
|
| 251 |
<i data-feather="clock" style="width: 14px; height: 14px;"></i>
|
| 252 |
</button>
|
| 253 |
</div>
|
|
|
|
| 239 |
<div class="progress-bar">
|
| 240 |
<div class="progress-fill" style="width: ${progress}%"></div>
|
| 241 |
</div>
|
| 242 |
+
<div class="edit-form" id="edit-form-${this.taskId}">
|
| 243 |
+
<div class="input-group">
|
| 244 |
+
<input type="text" value="${title}" id="edit-title-${this.taskId}" placeholder="Titel">
|
| 245 |
+
<input type="number" value="${Math.floor(estimatedTime / 60)}" id="edit-hours-${this.taskId}"
|
|
|
|
| 246 |
placeholder="h" min="0" max="24" style="width: 60px">
|
| 247 |
+
<input type="number" value="${estimatedTime % 60}" id="edit-minutes-${this.taskId}"
|
| 248 |
placeholder="m" min="0" max="59" step="15" style="width: 60px">
|
| 249 |
+
<button class="btn-small btn-add-time" @click="${this.handleAddTime}" title="Zeit hinzufügen">
|
| 250 |
<i data-feather="clock" style="width: 14px; height: 14px;"></i>
|
| 251 |
</button>
|
| 252 |
</div>
|
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class TimelineSidebar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.render();
|
| 5 |
+
this.setupEventListeners();
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
render() {
|
| 9 |
+
this.shadowRoot.innerHTML = `
|
| 10 |
+
<style>
|
| 11 |
+
:host {
|
| 12 |
+
display: block;
|
| 13 |
+
position: fixed;
|
| 14 |
+
right: 0;
|
| 15 |
+
top: 0;
|
| 16 |
+
height: 100vh;
|
| 17 |
+
width: 300px;
|
| 18 |
+
background: #1f2937;
|
| 19 |
+
border-left: 1px solid #374151;
|
| 20 |
+
z-index: 30;
|
| 21 |
+
transform: translateX(100%);
|
| 22 |
+
transition: transform 0.3s ease;
|
| 23 |
+
overflow-y: auto;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
:host(.open) {
|
| 27 |
+
transform: translateX(0);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.header {
|
| 31 |
+
padding: 1rem;
|
| 32 |
+
border-bottom: 1px solid #374151;
|
| 33 |
+
display: flex;
|
| 34 |
+
justify-content: space-between;
|
| 35 |
+
align-items: center;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.timeline-container {
|
| 39 |
+
padding: 1rem;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.timeline-hour {
|
| 43 |
+
position: relative;
|
| 44 |
+
min-height: 60px;
|
| 45 |
+
border-bottom: 1px solid #374151;
|
| 46 |
+
padding-left: 50px;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.hour-label {
|
| 50 |
+
position: absolute;
|
| 51 |
+
left: 10px;
|
| 52 |
+
top: 5px;
|
| 53 |
+
font-size: 12px;
|
| 54 |
+
color: #9ca3af;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.task-drop-area {
|
| 58 |
+
height: 100%;
|
| 59 |
+
min-height: 60px;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.toggle-btn {
|
| 63 |
+
position: fixed;
|
| 64 |
+
right: 300px;
|
| 65 |
+
top: 50%;
|
| 66 |
+
transform: translateY(-50%);
|
| 67 |
+
background: #1f2937;
|
| 68 |
+
border: 1px solid #374151;
|
| 69 |
+
border-right: none;
|
| 70 |
+
padding: 1rem 0.5rem;
|
| 71 |
+
border-radius: 5px 0 0 5px;
|
| 72 |
+
cursor: pointer;
|
| 73 |
+
z-index: 30;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.task-block {
|
| 77 |
+
background: #374151;
|
| 78 |
+
border-left: 3px solid #f97316;
|
| 79 |
+
padding: 0.5rem;
|
| 80 |
+
margin: 0.5rem 0;
|
| 81 |
+
border-radius: 4px;
|
| 82 |
+
}
|
| 83 |
+
</style>
|
| 84 |
+
|
| 85 |
+
<button class="toggle-btn">
|
| 86 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 87 |
+
<polyline points="15 18 9 12 15 6"></polyline>
|
| 88 |
+
</svg>
|
| 89 |
+
</button>
|
| 90 |
+
|
| 91 |
+
<div class="header">
|
| 92 |
+
<h3>Timeline</h3>
|
| 93 |
+
<button id="close-timeline">
|
| 94 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 95 |
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
| 96 |
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
| 97 |
+
</svg>
|
| 98 |
+
</button>
|
| 99 |
+
</div>
|
| 100 |
+
|
| 101 |
+
<div class="timeline-container" id="timeline-hours">
|
| 102 |
+
${Array.from({ length: 24 }, (_, i) => `
|
| 103 |
+
<div class="timeline-hour" data-hour="${i}">
|
| 104 |
+
<span class="hour-label">${i.toString().padStart(2, '0')}:00</span>
|
| 105 |
+
<div class="task-drop-area" data-hour="${i}"></div>
|
| 106 |
+
</div>
|
| 107 |
+
`).join('')}
|
| 108 |
+
</div>
|
| 109 |
+
`;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
setupEventListeners() {
|
| 113 |
+
const toggleBtn = this.shadowRoot.querySelector('.toggle-btn');
|
| 114 |
+
toggleBtn.addEventListener('click', () => {
|
| 115 |
+
this.classList.toggle('open');
|
| 116 |
+
const icon = toggleBtn.querySelector('svg');
|
| 117 |
+
if (this.classList.contains('open')) {
|
| 118 |
+
icon.innerHTML = '<polyline points="15 18 9 12 15 6"></polyline>';
|
| 119 |
+
} else {
|
| 120 |
+
icon.innerHTML = '<polyline points="9 18 15 12 9 6"></polyline>';
|
| 121 |
+
}
|
| 122 |
+
});
|
| 123 |
+
|
| 124 |
+
// Setup drag and drop
|
| 125 |
+
this.shadowRoot.addEventListener('dragover', (e) => {
|
| 126 |
+
if (e.target.classList.contains('task-drop-area')) {
|
| 127 |
+
e.preventDefault();
|
| 128 |
+
e.target.style.backgroundColor = '#37415170';
|
| 129 |
+
}
|
| 130 |
+
});
|
| 131 |
+
|
| 132 |
+
this.shadowRoot.addEventListener('dragleave', (e) => {
|
| 133 |
+
if (e.target.classList.contains('task-drop-area')) {
|
| 134 |
+
e.target.style.backgroundColor = '';
|
| 135 |
+
}
|
| 136 |
+
});
|
| 137 |
+
|
| 138 |
+
this.shadowRoot.addEventListener('drop', (e) => {
|
| 139 |
+
if (e.target.classList.contains('task-drop-area')) {
|
| 140 |
+
e.preventDefault();
|
| 141 |
+
e.target.style.backgroundColor = '';
|
| 142 |
+
|
| 143 |
+
const taskId = e.dataTransfer.getData('text/plain');
|
| 144 |
+
const hour = parseInt(e.target.dataset.hour);
|
| 145 |
+
|
| 146 |
+
this.dispatchEvent(new CustomEvent('task-dropped', {
|
| 147 |
+
detail: { taskId, hour }
|
| 148 |
+
}));
|
| 149 |
+
}
|
| 150 |
+
});
|
| 151 |
+
}
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
customElements.define('timeline-sidebar', TimelineSidebar);
|
|
@@ -226,11 +226,11 @@
|
|
| 226 |
<i data-feather="plus"></i>
|
| 227 |
</button>
|
| 228 |
</div>
|
| 229 |
-
|
| 230 |
<script src="components/task-item.js"></script>
|
| 231 |
<script src="components/tag-item.js"></script>
|
|
|
|
| 232 |
<script src="script.js"></script>
|
| 233 |
-
|
| 234 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 235 |
</body>
|
| 236 |
</html>
|
|
|
|
| 226 |
<i data-feather="plus"></i>
|
| 227 |
</button>
|
| 228 |
</div>
|
|
|
|
| 229 |
<script src="components/task-item.js"></script>
|
| 230 |
<script src="components/tag-item.js"></script>
|
| 231 |
+
<script src="components/timeline-sidebar.js"></script>
|
| 232 |
<script src="script.js"></script>
|
| 233 |
+
<script>feather.replace();</script>
|
| 234 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 235 |
</body>
|
| 236 |
</html>
|
|
@@ -694,13 +694,24 @@ function savePomodoroSettings() {
|
|
| 694 |
|
| 695 |
// Timeline Functions
|
| 696 |
function initializeTimeline() {
|
| 697 |
-
//
|
| 698 |
-
document.
|
| 699 |
-
document.
|
| 700 |
-
|
| 701 |
-
|
| 702 |
-
|
|
|
|
|
|
|
|
|
|
| 703 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 704 |
function handleDragStart(e) {
|
| 705 |
if (e.target.classList.contains('task-item')) {
|
| 706 |
const taskId = e.target.getAttribute('task-id');
|
|
|
|
| 694 |
|
| 695 |
// Timeline Functions
|
| 696 |
function initializeTimeline() {
|
| 697 |
+
// Initialize timeline sidebar
|
| 698 |
+
const timelineSidebar = document.createElement('timeline-sidebar');
|
| 699 |
+
document.body.appendChild(timelineSidebar);
|
| 700 |
+
|
| 701 |
+
// Listen for task drops
|
| 702 |
+
timelineSidebar.addEventListener('task-dropped', (e) => {
|
| 703 |
+
const { taskId, hour } = e.detail;
|
| 704 |
+
scheduleTask(taskId, hour, 0); // Schedule at top of hour
|
| 705 |
+
});
|
| 706 |
|
| 707 |
+
// Setup drag start for task items
|
| 708 |
+
document.addEventListener('dragstart', (e) => {
|
| 709 |
+
if (e.target.tagName === 'TASK-ITEM') {
|
| 710 |
+
const taskId = e.target.getAttribute('task-id');
|
| 711 |
+
e.dataTransfer.setData('text/plain', taskId);
|
| 712 |
+
}
|
| 713 |
+
});
|
| 714 |
+
}
|
| 715 |
function handleDragStart(e) {
|
| 716 |
if (e.target.classList.contains('task-item')) {
|
| 717 |
const taskId = e.target.getAttribute('task-id');
|