Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +500 -19
- prompts.txt +0 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: tasks-and-bugs
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: purple
|
5 |
+
colorTo: red
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,500 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Dev Workflow Tracker</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.gradient-bg {
|
11 |
+
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
|
12 |
+
}
|
13 |
+
.card-hover:hover {
|
14 |
+
transform: translateY(-5px);
|
15 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
16 |
+
}
|
17 |
+
.transition-all {
|
18 |
+
transition: all 0.3s ease;
|
19 |
+
}
|
20 |
+
.command-box {
|
21 |
+
font-family: 'Courier New', monospace;
|
22 |
+
background-color: #2d3748;
|
23 |
+
color: #f7fafc;
|
24 |
+
}
|
25 |
+
.status-pending {
|
26 |
+
background-color: #f6e05e;
|
27 |
+
color: #975a16;
|
28 |
+
}
|
29 |
+
.status-success {
|
30 |
+
background-color: #68d391;
|
31 |
+
color: #276749;
|
32 |
+
}
|
33 |
+
.status-failed {
|
34 |
+
background-color: #fc8181;
|
35 |
+
color: #9b2c2c;
|
36 |
+
}
|
37 |
+
.status-merged {
|
38 |
+
background-color: #63b3ed;
|
39 |
+
color: #2c5282;
|
40 |
+
}
|
41 |
+
</style>
|
42 |
+
</head>
|
43 |
+
<body class="bg-gray-100 min-h-screen">
|
44 |
+
<div class="gradient-bg text-white py-6 shadow-lg">
|
45 |
+
<div class="container mx-auto px-4">
|
46 |
+
<div class="flex justify-between items-center">
|
47 |
+
<h1 class="text-3xl font-bold flex items-center">
|
48 |
+
<i class="fas fa-code-branch mr-3"></i> Dev Workflow Tracker
|
49 |
+
</h1>
|
50 |
+
<button id="newTaskBtn" class="bg-white text-blue-800 px-4 py-2 rounded-lg font-semibold hover:bg-blue-100 transition-all">
|
51 |
+
<i class="fas fa-plus mr-2"></i> New Task
|
52 |
+
</button>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<div class="container mx-auto px-4 py-8">
|
58 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
59 |
+
<!-- Tasks Column -->
|
60 |
+
<div class="bg-white rounded-lg shadow-md p-6">
|
61 |
+
<div class="flex justify-between items-center mb-6">
|
62 |
+
<h2 class="text-xl font-semibold text-gray-800">
|
63 |
+
<i class="fas fa-tasks mr-2 text-blue-500"></i> Active Tasks
|
64 |
+
</h2>
|
65 |
+
<span class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium">
|
66 |
+
<span id="taskCount">0</span> tasks
|
67 |
+
</span>
|
68 |
+
</div>
|
69 |
+
<div id="tasksContainer" class="space-y-4">
|
70 |
+
<!-- Tasks will be added here dynamically -->
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
|
74 |
+
<!-- Merge Status Column -->
|
75 |
+
<div class="bg-white rounded-lg shadow-md p-6">
|
76 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-6">
|
77 |
+
<i class="fas fa-code-merge mr-2 text-green-500"></i> Merge Status
|
78 |
+
</h2>
|
79 |
+
<div id="mergeStatusContainer" class="space-y-4">
|
80 |
+
<!-- Merge status will be added here dynamically -->
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
|
84 |
+
<!-- Commands Column -->
|
85 |
+
<div class="bg-white rounded-lg shadow-md p-6">
|
86 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-6">
|
87 |
+
<i class="fas fa-terminal mr-2 text-purple-500"></i> Common Commands
|
88 |
+
</h2>
|
89 |
+
<div class="space-y-4">
|
90 |
+
<div class="command-box p-4 rounded-lg">
|
91 |
+
<div class="flex justify-between items-center mb-2">
|
92 |
+
<span class="font-semibold">Git Branch</span>
|
93 |
+
<button class="copy-btn text-blue-400 hover:text-blue-300" data-clipboard-text="git checkout -b feature/your-feature">
|
94 |
+
<i class="far fa-copy"></i>
|
95 |
+
</button>
|
96 |
+
</div>
|
97 |
+
<code>git checkout -b feature/your-feature</code>
|
98 |
+
</div>
|
99 |
+
<div class="command-box p-4 rounded-lg">
|
100 |
+
<div class="flex justify-between items-center mb-2">
|
101 |
+
<span class="font-semibold">Rebase</span>
|
102 |
+
<button class="copy-btn text-blue-400 hover:text-blue-300" data-clipboard-text="git pull --rebase origin dev">
|
103 |
+
<i class="far fa-copy"></i>
|
104 |
+
</button>
|
105 |
+
</div>
|
106 |
+
<code>git pull --rebase origin dev</code>
|
107 |
+
</div>
|
108 |
+
<div class="command-box p-4 rounded-lg">
|
109 |
+
<div class="flex justify-between items-center mb-2">
|
110 |
+
<span class="font-semibold">Merge</span>
|
111 |
+
<button class="copy-btn text-blue-400 hover:text-blue-300" data-clipboard-text="git merge --no-ff feature/your-feature">
|
112 |
+
<i class="far fa-copy"></i>
|
113 |
+
</button>
|
114 |
+
</div>
|
115 |
+
<code>git merge --no-ff feature/your-feature</code>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
|
122 |
+
<!-- New Task Modal -->
|
123 |
+
<div id="taskModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden">
|
124 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-md mx-4">
|
125 |
+
<div class="gradient-bg text-white rounded-t-lg px-6 py-4">
|
126 |
+
<h2 class="text-xl font-bold">Add New Task</h2>
|
127 |
+
</div>
|
128 |
+
<div class="p-6">
|
129 |
+
<form id="taskForm">
|
130 |
+
<div class="mb-4">
|
131 |
+
<label class="block text-gray-700 font-medium mb-2" for="taskType">Task Type</label>
|
132 |
+
<select id="taskType" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
133 |
+
<option value="feature">Feature</option>
|
134 |
+
<option value="bug">Bug</option>
|
135 |
+
<option value="hotfix">Hotfix</option>
|
136 |
+
<option value="refactor">Refactor</option>
|
137 |
+
</select>
|
138 |
+
</div>
|
139 |
+
<div class="mb-4">
|
140 |
+
<label class="block text-gray-700 font-medium mb-2" for="taskTitle">Title</label>
|
141 |
+
<input type="text" id="taskTitle" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="What are you working on?">
|
142 |
+
</div>
|
143 |
+
<div class="mb-4">
|
144 |
+
<label class="block text-gray-700 font-medium mb-2" for="branchName">Branch Name</label>
|
145 |
+
<input type="text" id="branchName" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="feature/your-feature">
|
146 |
+
</div>
|
147 |
+
<div class="mb-4">
|
148 |
+
<label class="block text-gray-700 font-medium mb-2">Affected Services</label>
|
149 |
+
<div class="space-y-2">
|
150 |
+
<div class="flex items-center">
|
151 |
+
<input type="checkbox" id="service1" class="mr-2" checked>
|
152 |
+
<label for="service1">Frontend</label>
|
153 |
+
</div>
|
154 |
+
<div class="flex items-center">
|
155 |
+
<input type="checkbox" id="service2" class="mr-2">
|
156 |
+
<label for="service2">User Service</label>
|
157 |
+
</div>
|
158 |
+
<div class="flex items-center">
|
159 |
+
<input type="checkbox" id="service3" class="mr-2">
|
160 |
+
<label for="service3">Payment Service</label>
|
161 |
+
</div>
|
162 |
+
<div class="flex items-center">
|
163 |
+
<input type="checkbox" id="service4" class="mr-2">
|
164 |
+
<label for="service4">Order Service</label>
|
165 |
+
</div>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
<div class="mb-4">
|
169 |
+
<label class="block text-gray-700 font-medium mb-2" for="mergeCommands">Merge Commands</label>
|
170 |
+
<textarea id="mergeCommands" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" rows="3" placeholder="Any special merge commands or notes"></textarea>
|
171 |
+
</div>
|
172 |
+
<div class="flex justify-end space-x-3">
|
173 |
+
<button type="button" id="cancelTaskBtn" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-100">Cancel</button>
|
174 |
+
<button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">Add Task</button>
|
175 |
+
</div>
|
176 |
+
</form>
|
177 |
+
</div>
|
178 |
+
</div>
|
179 |
+
</div>
|
180 |
+
|
181 |
+
<script>
|
182 |
+
document.addEventListener('DOMContentLoaded', function() {
|
183 |
+
// Sample data for demonstration
|
184 |
+
const sampleTasks = [
|
185 |
+
{
|
186 |
+
id: 1,
|
187 |
+
type: 'feature',
|
188 |
+
title: 'Add user profile page',
|
189 |
+
branch: 'feature/user-profile',
|
190 |
+
services: ['Frontend', 'User Service'],
|
191 |
+
commands: 'git pull --rebase origin dev\nnpm run test\n',
|
192 |
+
devStatus: 'pending',
|
193 |
+
masterStatus: 'pending'
|
194 |
+
},
|
195 |
+
{
|
196 |
+
id: 2,
|
197 |
+
type: 'bug',
|
198 |
+
title: 'Fix payment validation',
|
199 |
+
branch: 'bugfix/payment-validation',
|
200 |
+
services: ['Payment Service'],
|
201 |
+
commands: 'git fetch origin\n',
|
202 |
+
devStatus: 'merged',
|
203 |
+
masterStatus: 'pending'
|
204 |
+
}
|
205 |
+
];
|
206 |
+
|
207 |
+
let tasks = JSON.parse(localStorage.getItem('devTasks')) || sampleTasks;
|
208 |
+
|
209 |
+
// DOM elements
|
210 |
+
const tasksContainer = document.getElementById('tasksContainer');
|
211 |
+
const mergeStatusContainer = document.getElementById('mergeStatusContainer');
|
212 |
+
const taskModal = document.getElementById('taskModal');
|
213 |
+
const newTaskBtn = document.getElementById('newTaskBtn');
|
214 |
+
const cancelTaskBtn = document.getElementById('cancelTaskBtn');
|
215 |
+
const taskForm = document.getElementById('taskForm');
|
216 |
+
const taskCount = document.getElementById('taskCount');
|
217 |
+
|
218 |
+
// Initialize clipboard functionality
|
219 |
+
document.querySelectorAll('.copy-btn').forEach(btn => {
|
220 |
+
btn.addEventListener('click', function() {
|
221 |
+
const text = this.getAttribute('data-clipboard-text');
|
222 |
+
navigator.clipboard.writeText(text).then(() => {
|
223 |
+
const originalIcon = this.innerHTML;
|
224 |
+
this.innerHTML = '<i class="fas fa-check"></i>';
|
225 |
+
setTimeout(() => {
|
226 |
+
this.innerHTML = originalIcon;
|
227 |
+
}, 2000);
|
228 |
+
});
|
229 |
+
});
|
230 |
+
});
|
231 |
+
|
232 |
+
// Modal controls
|
233 |
+
newTaskBtn.addEventListener('click', () => {
|
234 |
+
taskModal.classList.remove('hidden');
|
235 |
+
});
|
236 |
+
|
237 |
+
cancelTaskBtn.addEventListener('click', () => {
|
238 |
+
taskModal.classList.add('hidden');
|
239 |
+
});
|
240 |
+
|
241 |
+
// Form submission
|
242 |
+
taskForm.addEventListener('submit', function(e) {
|
243 |
+
e.preventDefault();
|
244 |
+
|
245 |
+
const type = document.getElementById('taskType').value;
|
246 |
+
const title = document.getElementById('taskTitle').value.trim();
|
247 |
+
const branch = document.getElementById('branchName').value.trim();
|
248 |
+
|
249 |
+
if (!title || !branch) {
|
250 |
+
alert('Please fill in all required fields');
|
251 |
+
return;
|
252 |
+
}
|
253 |
+
|
254 |
+
// Get selected services
|
255 |
+
const services = [];
|
256 |
+
document.querySelectorAll('input[type="checkbox"]:checked').forEach(checkbox => {
|
257 |
+
services.push(checkbox.nextElementSibling.textContent);
|
258 |
+
});
|
259 |
+
|
260 |
+
const commands = document.getElementById('mergeCommands').value.trim();
|
261 |
+
|
262 |
+
const newTask = {
|
263 |
+
id: Date.now(),
|
264 |
+
type,
|
265 |
+
title,
|
266 |
+
branch,
|
267 |
+
services,
|
268 |
+
commands,
|
269 |
+
devStatus: 'pending',
|
270 |
+
masterStatus: 'pending'
|
271 |
+
};
|
272 |
+
|
273 |
+
tasks.push(newTask);
|
274 |
+
saveTasks();
|
275 |
+
renderTasks();
|
276 |
+
renderMergeStatus();
|
277 |
+
taskModal.classList.add('hidden');
|
278 |
+
taskForm.reset();
|
279 |
+
});
|
280 |
+
|
281 |
+
// Save tasks to localStorage
|
282 |
+
function saveTasks() {
|
283 |
+
localStorage.setItem('devTasks', JSON.stringify(tasks));
|
284 |
+
updateTaskCount();
|
285 |
+
}
|
286 |
+
|
287 |
+
// Update task count
|
288 |
+
function updateTaskCount() {
|
289 |
+
taskCount.textContent = tasks.length;
|
290 |
+
}
|
291 |
+
|
292 |
+
// Render tasks
|
293 |
+
function renderTasks() {
|
294 |
+
tasksContainer.innerHTML = '';
|
295 |
+
|
296 |
+
tasks.forEach(task => {
|
297 |
+
const taskElement = document.createElement('div');
|
298 |
+
taskElement.className = 'bg-white border border-gray-200 rounded-lg p-4 shadow-sm card-hover transition-all';
|
299 |
+
|
300 |
+
const typeIcon = task.type === 'feature' ? 'fa-star' :
|
301 |
+
task.type === 'bug' ? 'fa-bug' :
|
302 |
+
task.type === 'hotfix' ? 'fa-fire' : 'fa-code';
|
303 |
+
|
304 |
+
taskElement.innerHTML = `
|
305 |
+
<div class="flex justify-between items-start mb-2">
|
306 |
+
<div class="flex items-center">
|
307 |
+
<i class="fas ${typeIcon} mr-2 ${task.type === 'feature' ? 'text-blue-500' : 'text-red-500'}"></i>
|
308 |
+
<h3 class="font-semibold text-gray-800">${task.title}</h3>
|
309 |
+
</div>
|
310 |
+
<button class="delete-task text-gray-400 hover:text-red-500" data-id="${task.id}">
|
311 |
+
<i class="fas fa-times"></i>
|
312 |
+
</button>
|
313 |
+
</div>
|
314 |
+
<div class="mb-2">
|
315 |
+
<span class="text-sm font-medium text-gray-600">Branch:</span>
|
316 |
+
<span class="text-sm ml-2 font-mono bg-gray-100 px-2 py-1 rounded">${task.branch}</span>
|
317 |
+
</div>
|
318 |
+
<div class="mb-3">
|
319 |
+
<span class="text-sm font-medium text-gray-600">Services:</span>
|
320 |
+
<div class="flex flex-wrap gap-1 mt-1">
|
321 |
+
${task.services.map(service => `
|
322 |
+
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">${service}</span>
|
323 |
+
`).join('')}
|
324 |
+
</div>
|
325 |
+
</div>
|
326 |
+
${task.commands ? `
|
327 |
+
<div class="mb-3">
|
328 |
+
<span class="text-sm font-medium text-gray-600">Commands:</span>
|
329 |
+
<div class="command-box p-2 rounded mt-1 text-xs">
|
330 |
+
<pre>${task.commands}</pre>
|
331 |
+
</div>
|
332 |
+
</div>
|
333 |
+
` : ''}
|
334 |
+
<div class="flex justify-between items-center pt-2 border-t border-gray-100">
|
335 |
+
<div>
|
336 |
+
<span class="text-xs text-gray-500">Created: ${new Date(task.id).toLocaleDateString()}</span>
|
337 |
+
</div>
|
338 |
+
<div class="flex space-x-2">
|
339 |
+
<button class="edit-task text-blue-500 hover:text-blue-700 text-sm" data-id="${task.id}">
|
340 |
+
<i class="fas fa-edit mr-1"></i>Edit
|
341 |
+
</button>
|
342 |
+
<button class="update-status text-green-500 hover:text-green-700 text-sm" data-id="${task.id}">
|
343 |
+
<i class="fas fa-sync-alt mr-1"></i>Update Status
|
344 |
+
</button>
|
345 |
+
</div>
|
346 |
+
</div>
|
347 |
+
`;
|
348 |
+
|
349 |
+
tasksContainer.appendChild(taskElement);
|
350 |
+
});
|
351 |
+
|
352 |
+
// Add event listeners for delete buttons
|
353 |
+
document.querySelectorAll('.delete-task').forEach(btn => {
|
354 |
+
btn.addEventListener('click', function() {
|
355 |
+
const taskId = parseInt(this.getAttribute('data-id'));
|
356 |
+
tasks = tasks.filter(task => task.id !== taskId);
|
357 |
+
saveTasks();
|
358 |
+
renderTasks();
|
359 |
+
renderMergeStatus();
|
360 |
+
});
|
361 |
+
});
|
362 |
+
|
363 |
+
// Add event listeners for edit buttons
|
364 |
+
document.querySelectorAll('.edit-task').forEach(btn => {
|
365 |
+
btn.addEventListener('click', function() {
|
366 |
+
const taskId = parseInt(this.getAttribute('data-id'));
|
367 |
+
const task = tasks.find(t => t.id === taskId);
|
368 |
+
if (task) {
|
369 |
+
// Populate the form with task data
|
370 |
+
document.getElementById('taskType').value = task.type;
|
371 |
+
document.getElementById('taskTitle').value = task.title;
|
372 |
+
document.getElementById('branchName').value = task.branch;
|
373 |
+
document.getElementById('mergeCommands').value = task.commands || '';
|
374 |
+
|
375 |
+
// Check the appropriate service checkboxes
|
376 |
+
document.querySelectorAll('input[type="checkbox"]').forEach(checkbox => {
|
377 |
+
const serviceName = checkbox.nextElementSibling.textContent;
|
378 |
+
checkbox.checked = task.services.includes(serviceName);
|
379 |
+
});
|
380 |
+
|
381 |
+
// Show the modal
|
382 |
+
taskModal.classList.remove('hidden');
|
383 |
+
|
384 |
+
// Remove the task from the array when saved
|
385 |
+
taskForm.onsubmit = function(e) {
|
386 |
+
e.preventDefault();
|
387 |
+
|
388 |
+
const type = document.getElementById('taskType').value;
|
389 |
+
const title = document.getElementById('taskTitle').value.trim();
|
390 |
+
const branch = document.getElementById('branchName').value.trim();
|
391 |
+
|
392 |
+
if (!title || !branch) {
|
393 |
+
alert('Please fill in all required fields');
|
394 |
+
return;
|
395 |
+
}
|
396 |
+
|
397 |
+
// Get selected services
|
398 |
+
const services = [];
|
399 |
+
document.querySelectorAll('input[type="checkbox"]:checked').forEach(checkbox => {
|
400 |
+
services.push(checkbox.nextElementSibling.textContent);
|
401 |
+
});
|
402 |
+
|
403 |
+
const commands = document.getElementById('mergeCommands').value.trim();
|
404 |
+
|
405 |
+
// Update the task
|
406 |
+
const updatedTask = {
|
407 |
+
...task,
|
408 |
+
type,
|
409 |
+
title,
|
410 |
+
branch,
|
411 |
+
services,
|
412 |
+
commands
|
413 |
+
};
|
414 |
+
|
415 |
+
tasks = tasks.map(t => t.id === task.id ? updatedTask : t);
|
416 |
+
saveTasks();
|
417 |
+
renderTasks();
|
418 |
+
renderMergeStatus();
|
419 |
+
taskModal.classList.add('hidden');
|
420 |
+
taskForm.reset();
|
421 |
+
taskForm.onsubmit = originalSubmitHandler;
|
422 |
+
};
|
423 |
+
}
|
424 |
+
});
|
425 |
+
});
|
426 |
+
|
427 |
+
// Add event listeners for status update buttons
|
428 |
+
document.querySelectorAll('.update-status').forEach(btn => {
|
429 |
+
btn.addEventListener('click', function() {
|
430 |
+
const taskId = parseInt(this.getAttribute('data-id'));
|
431 |
+
const task = tasks.find(t => t.id === taskId);
|
432 |
+
if (task) {
|
433 |
+
if (task.devStatus === 'pending') {
|
434 |
+
task.devStatus = 'merged';
|
435 |
+
} else if (task.masterStatus === 'pending') {
|
436 |
+
task.masterStatus = 'merged';
|
437 |
+
}
|
438 |
+
saveTasks();
|
439 |
+
renderTasks();
|
440 |
+
renderMergeStatus();
|
441 |
+
}
|
442 |
+
});
|
443 |
+
});
|
444 |
+
|
445 |
+
updateTaskCount();
|
446 |
+
}
|
447 |
+
|
448 |
+
// Render merge status
|
449 |
+
function renderMergeStatus() {
|
450 |
+
mergeStatusContainer.innerHTML = '';
|
451 |
+
|
452 |
+
tasks.forEach(task => {
|
453 |
+
const statusElement = document.createElement('div');
|
454 |
+
statusElement.className = 'bg-white border border-gray-200 rounded-lg p-4 shadow-sm card-hover transition-all';
|
455 |
+
|
456 |
+
statusElement.innerHTML = `
|
457 |
+
<div class="flex justify-between items-start mb-2">
|
458 |
+
<h3 class="font-semibold text-gray-800">${task.title}</h3>
|
459 |
+
<span class="text-xs font-mono bg-gray-100 px-2 py-1 rounded">${task.branch}</span>
|
460 |
+
</div>
|
461 |
+
<div class="grid grid-cols-2 gap-4">
|
462 |
+
<div class="p-2 rounded text-center">
|
463 |
+
<div class="text-xs font-medium text-gray-600 mb-1">DEV</div>
|
464 |
+
<span class="px-3 py-1 rounded-full text-xs font-medium status-${task.devStatus}">
|
465 |
+
${task.devStatus === 'pending' ? 'Pending' : 'Merged'}
|
466 |
+
</span>
|
467 |
+
</div>
|
468 |
+
<div class="p-2 rounded text-center">
|
469 |
+
<div class="text-xs font-medium text-gray-600 mb-1">MASTER</div>
|
470 |
+
<span class="px-3 py-1 rounded-full text-xs font-medium status-${task.masterStatus}">
|
471 |
+
${task.masterStatus === 'pending' ? 'Pending' : 'Merged'}
|
472 |
+
</span>
|
473 |
+
</div>
|
474 |
+
</div>
|
475 |
+
${task.services.length > 0 ? `
|
476 |
+
<div class="mt-3 pt-2 border-t border-gray-100">
|
477 |
+
<div class="text-xs font-medium text-gray-600 mb-1">Services:</div>
|
478 |
+
<div class="flex flex-wrap gap-1">
|
479 |
+
${task.services.map(service => `
|
480 |
+
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">${service}</span>
|
481 |
+
`).join('')}
|
482 |
+
</div>
|
483 |
+
</div>
|
484 |
+
` : ''}
|
485 |
+
`;
|
486 |
+
|
487 |
+
mergeStatusContainer.appendChild(statusElement);
|
488 |
+
});
|
489 |
+
}
|
490 |
+
|
491 |
+
// Store the original form submit handler
|
492 |
+
const originalSubmitHandler = taskForm.onsubmit;
|
493 |
+
|
494 |
+
// Initial render
|
495 |
+
renderTasks();
|
496 |
+
renderMergeStatus();
|
497 |
+
});
|
498 |
+
</script>
|
499 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=salmanarshad/tasks-and-bugs" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
500 |
+
</html>
|
prompts.txt
ADDED
File without changes
|