Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +564 -19
- prompts.txt +1 -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: tasksandbugs
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: green
|
5 |
+
colorTo: green
|
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,564 @@
|
|
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 |
+
.service-tag {
|
42 |
+
display: inline-flex;
|
43 |
+
align-items: center;
|
44 |
+
background-color: #ebf8ff;
|
45 |
+
color: #3182ce;
|
46 |
+
padding: 0.25rem 0.5rem;
|
47 |
+
border-radius: 0.25rem;
|
48 |
+
margin-right: 0.25rem;
|
49 |
+
margin-bottom: 0.25rem;
|
50 |
+
}
|
51 |
+
.service-tag-remove {
|
52 |
+
margin-left: 0.25rem;
|
53 |
+
cursor: pointer;
|
54 |
+
color: #3182ce;
|
55 |
+
}
|
56 |
+
.service-input-container {
|
57 |
+
display: flex;
|
58 |
+
flex-wrap: wrap;
|
59 |
+
align-items: center;
|
60 |
+
min-height: 42px;
|
61 |
+
padding: 0.25rem;
|
62 |
+
border: 1px solid #d1d5db;
|
63 |
+
border-radius: 0.375rem;
|
64 |
+
}
|
65 |
+
.service-input {
|
66 |
+
flex: 1;
|
67 |
+
min-width: 150px;
|
68 |
+
border: none;
|
69 |
+
outline: none;
|
70 |
+
padding: 0.25rem;
|
71 |
+
}
|
72 |
+
</style>
|
73 |
+
</head>
|
74 |
+
<body class="bg-gray-100 min-h-screen">
|
75 |
+
<div class="gradient-bg text-white py-6 shadow-lg">
|
76 |
+
<div class="container mx-auto px-4">
|
77 |
+
<div class="flex justify-between items-center">
|
78 |
+
<h1 class="text-3xl font-bold flex items-center">
|
79 |
+
<i class="fas fa-code-branch mr-3"></i> Dev Workflow Tracker
|
80 |
+
</h1>
|
81 |
+
<button id="newTaskBtn" class="bg-white text-blue-800 px-4 py-2 rounded-lg font-semibold hover:bg-blue-100 transition-all">
|
82 |
+
<i class="fas fa-plus mr-2"></i> New Task
|
83 |
+
</button>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
</div>
|
87 |
+
|
88 |
+
<div class="container mx-auto px-4 py-8">
|
89 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
90 |
+
<!-- Tasks Column -->
|
91 |
+
<div class="bg-white rounded-lg shadow-md p-6">
|
92 |
+
<div class="flex justify-between items-center mb-6">
|
93 |
+
<h2 class="text-xl font-semibold text-gray-800">
|
94 |
+
<i class="fas fa-tasks mr-2 text-blue-500"></i> Active Tasks
|
95 |
+
</h2>
|
96 |
+
<span class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium">
|
97 |
+
<span id="taskCount">0</span> tasks
|
98 |
+
</span>
|
99 |
+
</div>
|
100 |
+
<div id="tasksContainer" class="space-y-4">
|
101 |
+
<!-- Tasks will be added here dynamically -->
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
|
105 |
+
<!-- Merge Status Column -->
|
106 |
+
<div class="bg-white rounded-lg shadow-md p-6">
|
107 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-6">
|
108 |
+
<i class="fas fa-code-merge mr-2 text-green-500"></i> Merge Status
|
109 |
+
</h2>
|
110 |
+
<div id="mergeStatusContainer" class="space-y-4">
|
111 |
+
<!-- Merge status will be added here dynamically -->
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<!-- Commands Column -->
|
116 |
+
<div class="bg-white rounded-lg shadow-md p-6">
|
117 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-6">
|
118 |
+
<i class="fas fa-terminal mr-2 text-purple-500"></i> Common Commands
|
119 |
+
</h2>
|
120 |
+
<div class="space-y-4">
|
121 |
+
<div class="command-box p-4 rounded-lg">
|
122 |
+
<div class="flex justify-between items-center mb-2">
|
123 |
+
<span class="font-semibold">Git Branch</span>
|
124 |
+
<button class="copy-btn text-blue-400 hover:text-blue-300" data-clipboard-text="git checkout -b feature/your-feature">
|
125 |
+
<i class="far fa-copy"></i>
|
126 |
+
</button>
|
127 |
+
</div>
|
128 |
+
<code>git checkout -b feature/your-feature</code>
|
129 |
+
</div>
|
130 |
+
<div class="command-box p-4 rounded-lg">
|
131 |
+
<div class="flex justify-between items-center mb-2">
|
132 |
+
<span class="font-semibold">Rebase</span>
|
133 |
+
<button class="copy-btn text-blue-400 hover:text-blue-300" data-clipboard-text="git pull --rebase origin dev">
|
134 |
+
<i class="far fa-copy"></i>
|
135 |
+
</button>
|
136 |
+
</div>
|
137 |
+
<code>git pull --rebase origin dev</code>
|
138 |
+
</div>
|
139 |
+
<div class="command-box p-4 rounded-lg">
|
140 |
+
<div class="flex justify-between items-center mb-2">
|
141 |
+
<span class="font-semibold">Merge</span>
|
142 |
+
<button class="copy-btn text-blue-400 hover:text-blue-300" data-clipboard-text="git merge --no-ff feature/your-feature">
|
143 |
+
<i class="far fa-copy"></i>
|
144 |
+
</button>
|
145 |
+
</div>
|
146 |
+
<code>git merge --no-ff feature/your-feature</code>
|
147 |
+
</div>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
|
153 |
+
<!-- New Task Modal -->
|
154 |
+
<div id="taskModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden">
|
155 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-md mx-4">
|
156 |
+
<div class="gradient-bg text-white rounded-t-lg px-6 py-4">
|
157 |
+
<h2 class="text-xl font-bold">Add New Task</h2>
|
158 |
+
</div>
|
159 |
+
<div class="p-6">
|
160 |
+
<form id="taskForm">
|
161 |
+
<div class="mb-4">
|
162 |
+
<label class="block text-gray-700 font-medium mb-2" for="taskType">Task Type</label>
|
163 |
+
<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">
|
164 |
+
<option value="feature">Feature</option>
|
165 |
+
<option value="bug">Bug</option>
|
166 |
+
<option value="hotfix">Hotfix</option>
|
167 |
+
<option value="refactor">Refactor</option>
|
168 |
+
</select>
|
169 |
+
</div>
|
170 |
+
<div class="mb-4">
|
171 |
+
<label class="block text-gray-700 font-medium mb-2" for="taskTitle">Title</label>
|
172 |
+
<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?">
|
173 |
+
</div>
|
174 |
+
<div class="mb-4">
|
175 |
+
<label class="block text-gray-700 font-medium mb-2" for="branchName">Branch Name</label>
|
176 |
+
<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">
|
177 |
+
</div>
|
178 |
+
<div class="mb-4">
|
179 |
+
<label class="block text-gray-700 font-medium mb-2">Affected Services</label>
|
180 |
+
<div class="service-input-container">
|
181 |
+
<div id="serviceTagsContainer" class="flex flex-wrap"></div>
|
182 |
+
<input type="text" id="serviceInput" class="service-input" placeholder="Type service name and press Enter">
|
183 |
+
</div>
|
184 |
+
<div class="mt-1 text-xs text-gray-500">Press Enter to add a service</div>
|
185 |
+
</div>
|
186 |
+
<div class="mb-4">
|
187 |
+
<label class="block text-gray-700 font-medium mb-2" for="mergeCommands">Merge Commands</label>
|
188 |
+
<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>
|
189 |
+
</div>
|
190 |
+
<div class="flex justify-end space-x-3">
|
191 |
+
<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>
|
192 |
+
<button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">Add Task</button>
|
193 |
+
</div>
|
194 |
+
</form>
|
195 |
+
</div>
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
|
199 |
+
<script>
|
200 |
+
document.addEventListener('DOMContentLoaded', function() {
|
201 |
+
// Sample data for demonstration
|
202 |
+
const sampleTasks = [
|
203 |
+
{
|
204 |
+
id: 1,
|
205 |
+
type: 'feature',
|
206 |
+
title: 'Add user profile page',
|
207 |
+
branch: 'feature/user-profile',
|
208 |
+
services: ['Frontend', 'User Service'],
|
209 |
+
commands: 'git pull --rebase origin dev\nnpm run test\n',
|
210 |
+
devStatus: 'pending',
|
211 |
+
masterStatus: 'pending'
|
212 |
+
},
|
213 |
+
{
|
214 |
+
id: 2,
|
215 |
+
type: 'bug',
|
216 |
+
title: 'Fix payment validation',
|
217 |
+
branch: 'bugfix/payment-validation',
|
218 |
+
services: ['Payment Service'],
|
219 |
+
commands: 'git fetch origin\n',
|
220 |
+
devStatus: 'merged',
|
221 |
+
masterStatus: 'pending'
|
222 |
+
}
|
223 |
+
];
|
224 |
+
|
225 |
+
let tasks = JSON.parse(localStorage.getItem('devTasks')) || sampleTasks;
|
226 |
+
let currentEditingTaskId = null;
|
227 |
+
|
228 |
+
// DOM elements
|
229 |
+
const tasksContainer = document.getElementById('tasksContainer');
|
230 |
+
const mergeStatusContainer = document.getElementById('mergeStatusContainer');
|
231 |
+
const taskModal = document.getElementById('taskModal');
|
232 |
+
const newTaskBtn = document.getElementById('newTaskBtn');
|
233 |
+
const cancelTaskBtn = document.getElementById('cancelTaskBtn');
|
234 |
+
const taskForm = document.getElementById('taskForm');
|
235 |
+
const taskCount = document.getElementById('taskCount');
|
236 |
+
const serviceInput = document.getElementById('serviceInput');
|
237 |
+
const serviceTagsContainer = document.getElementById('serviceTagsContainer');
|
238 |
+
|
239 |
+
// Initialize clipboard functionality
|
240 |
+
document.querySelectorAll('.copy-btn').forEach(btn => {
|
241 |
+
btn.addEventListener('click', function() {
|
242 |
+
const text = this.getAttribute('data-clipboard-text');
|
243 |
+
navigator.clipboard.writeText(text).then(() => {
|
244 |
+
const originalIcon = this.innerHTML;
|
245 |
+
this.innerHTML = '<i class="fas fa-check"></i>';
|
246 |
+
setTimeout(() => {
|
247 |
+
this.innerHTML = originalIcon;
|
248 |
+
}, 2000);
|
249 |
+
});
|
250 |
+
});
|
251 |
+
});
|
252 |
+
|
253 |
+
// Modal controls
|
254 |
+
newTaskBtn.addEventListener('click', () => {
|
255 |
+
currentEditingTaskId = null;
|
256 |
+
serviceTagsContainer.innerHTML = '';
|
257 |
+
taskModal.classList.remove('hidden');
|
258 |
+
});
|
259 |
+
|
260 |
+
cancelTaskBtn.addEventListener('click', () => {
|
261 |
+
taskModal.classList.add('hidden');
|
262 |
+
});
|
263 |
+
|
264 |
+
// Service input functionality
|
265 |
+
serviceInput.addEventListener('keydown', function(e) {
|
266 |
+
if (e.key === 'Enter' && this.value.trim()) {
|
267 |
+
e.preventDefault();
|
268 |
+
addServiceTag(this.value.trim());
|
269 |
+
this.value = '';
|
270 |
+
}
|
271 |
+
});
|
272 |
+
|
273 |
+
function addServiceTag(serviceName) {
|
274 |
+
const tagId = Date.now();
|
275 |
+
const tagElement = document.createElement('div');
|
276 |
+
tagElement.className = 'service-tag';
|
277 |
+
tagElement.innerHTML = `
|
278 |
+
${serviceName}
|
279 |
+
<span class="service-tag-remove" data-tag-id="${tagId}">
|
280 |
+
<i class="fas fa-times"></i>
|
281 |
+
</span>
|
282 |
+
`;
|
283 |
+
serviceTagsContainer.appendChild(tagElement);
|
284 |
+
|
285 |
+
// Add remove event listener
|
286 |
+
tagElement.querySelector('.service-tag-remove').addEventListener('click', function() {
|
287 |
+
this.parentElement.remove();
|
288 |
+
});
|
289 |
+
}
|
290 |
+
|
291 |
+
function renderServiceTags(services) {
|
292 |
+
serviceTagsContainer.innerHTML = '';
|
293 |
+
services.forEach(service => {
|
294 |
+
addServiceTag(service);
|
295 |
+
});
|
296 |
+
}
|
297 |
+
|
298 |
+
function getCurrentServices() {
|
299 |
+
const serviceTags = Array.from(serviceTagsContainer.querySelectorAll('.service-tag'));
|
300 |
+
return serviceTags.map(tag => {
|
301 |
+
return tag.textContent.trim().replace('×', '').trim();
|
302 |
+
});
|
303 |
+
}
|
304 |
+
|
305 |
+
// Form submission
|
306 |
+
taskForm.addEventListener('submit', function(e) {
|
307 |
+
e.preventDefault();
|
308 |
+
|
309 |
+
const type = document.getElementById('taskType').value;
|
310 |
+
const title = document.getElementById('taskTitle').value.trim();
|
311 |
+
const branch = document.getElementById('branchName').value.trim();
|
312 |
+
|
313 |
+
if (!title || !branch) {
|
314 |
+
alert('Please fill in all required fields');
|
315 |
+
return;
|
316 |
+
}
|
317 |
+
|
318 |
+
// Get services from tags
|
319 |
+
const services = getCurrentServices();
|
320 |
+
const commands = document.getElementById('mergeCommands').value.trim();
|
321 |
+
|
322 |
+
if (currentEditingTaskId) {
|
323 |
+
// Update existing task
|
324 |
+
tasks = tasks.map(task => {
|
325 |
+
if (task.id === currentEditingTaskId) {
|
326 |
+
return {
|
327 |
+
...task,
|
328 |
+
type,
|
329 |
+
title,
|
330 |
+
branch,
|
331 |
+
services,
|
332 |
+
commands
|
333 |
+
};
|
334 |
+
}
|
335 |
+
return task;
|
336 |
+
});
|
337 |
+
} else {
|
338 |
+
// Create new task
|
339 |
+
const newTask = {
|
340 |
+
id: Date.now(),
|
341 |
+
type,
|
342 |
+
title,
|
343 |
+
branch,
|
344 |
+
services,
|
345 |
+
commands,
|
346 |
+
devStatus: 'pending',
|
347 |
+
masterStatus: 'pending'
|
348 |
+
};
|
349 |
+
|
350 |
+
tasks.push(newTask);
|
351 |
+
}
|
352 |
+
|
353 |
+
saveTasks();
|
354 |
+
renderTasks();
|
355 |
+
renderMergeStatus();
|
356 |
+
taskModal.classList.add('hidden');
|
357 |
+
taskForm.reset();
|
358 |
+
serviceTagsContainer.innerHTML = '';
|
359 |
+
currentEditingTaskId = null;
|
360 |
+
});
|
361 |
+
|
362 |
+
// Save tasks to localStorage
|
363 |
+
function saveTasks() {
|
364 |
+
localStorage.setItem('devTasks', JSON.stringify(tasks));
|
365 |
+
updateTaskCount();
|
366 |
+
}
|
367 |
+
|
368 |
+
// Update task count
|
369 |
+
function updateTaskCount() {
|
370 |
+
taskCount.textContent = tasks.length;
|
371 |
+
}
|
372 |
+
|
373 |
+
// Render tasks
|
374 |
+
function renderTasks() {
|
375 |
+
tasksContainer.innerHTML = '';
|
376 |
+
|
377 |
+
tasks.forEach(task => {
|
378 |
+
const taskElement = document.createElement('div');
|
379 |
+
taskElement.className = 'bg-white border border-gray-200 rounded-lg p-4 shadow-sm card-hover transition-all';
|
380 |
+
|
381 |
+
const typeIcon = task.type === 'feature' ? 'fa-star' :
|
382 |
+
task.type === 'bug' ? 'fa-bug' :
|
383 |
+
task.type === 'hotfix' ? 'fa-fire' : 'fa-code';
|
384 |
+
|
385 |
+
taskElement.innerHTML = `
|
386 |
+
<div class="flex justify-between items-start mb-2">
|
387 |
+
<div class="flex items-center">
|
388 |
+
<i class="fas ${typeIcon} mr-2 ${task.type === 'feature' ? 'text-blue-500' : 'text-red-500'}"></i>
|
389 |
+
<h3 class="font-semibold text-gray-800">${task.title}</h3>
|
390 |
+
</div>
|
391 |
+
<button class="delete-task text-gray-400 hover:text-red-500" data-id="${task.id}">
|
392 |
+
<i class="fas fa-times"></i>
|
393 |
+
</button>
|
394 |
+
</div>
|
395 |
+
<div class="mb-2">
|
396 |
+
<span class="text-sm font-medium text-gray-600">Branch:</span>
|
397 |
+
<span class="branch-name text-sm ml-2 font-mono bg-gray-100 px-2 py-1 rounded cursor-pointer hover:bg-gray-200" data-id="${task.id}">${task.branch}</span>
|
398 |
+
</div>
|
399 |
+
<div class="mb-3">
|
400 |
+
<span class="text-sm font-medium text-gray-600">Services:</span>
|
401 |
+
<div class="flex flex-wrap gap-1 mt-1">
|
402 |
+
${task.services.map(service => `
|
403 |
+
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">${service}</span>
|
404 |
+
`).join('')}
|
405 |
+
</div>
|
406 |
+
</div>
|
407 |
+
${task.commands ? `
|
408 |
+
<div class="mb-3">
|
409 |
+
<span class="text-sm font-medium text-gray-600">Commands:</span>
|
410 |
+
<div class="command-box p-2 rounded mt-1 text-xs">
|
411 |
+
<pre>${task.commands}</pre>
|
412 |
+
</div>
|
413 |
+
</div>
|
414 |
+
` : ''}
|
415 |
+
<div class="flex justify-between items-center pt-2 border-t border-gray-100">
|
416 |
+
<div>
|
417 |
+
<span class="text-xs text-gray-500">Created: ${new Date(task.id).toLocaleDateString()}</span>
|
418 |
+
</div>
|
419 |
+
<div class="flex space-x-2">
|
420 |
+
<button class="edit-task text-blue-500 hover:text-blue-700 text-sm" data-id="${task.id}">
|
421 |
+
<i class="fas fa-edit mr-1"></i>Edit
|
422 |
+
</button>
|
423 |
+
</div>
|
424 |
+
</div>
|
425 |
+
`;
|
426 |
+
|
427 |
+
tasksContainer.appendChild(taskElement);
|
428 |
+
});
|
429 |
+
|
430 |
+
// Add event listeners for branch name clicks (status toggle)
|
431 |
+
document.querySelectorAll('.branch-name').forEach(branch => {
|
432 |
+
branch.addEventListener('click', function() {
|
433 |
+
const taskId = parseInt(this.getAttribute('data-id'));
|
434 |
+
const task = tasks.find(t => t.id === taskId);
|
435 |
+
if (task) {
|
436 |
+
if (task.devStatus === 'pending') {
|
437 |
+
task.devStatus = 'merged';
|
438 |
+
} else if (task.masterStatus === 'pending') {
|
439 |
+
task.masterStatus = 'merged';
|
440 |
+
} else {
|
441 |
+
// Reset both statuses if both are merged
|
442 |
+
task.devStatus = 'pending';
|
443 |
+
task.masterStatus = 'pending';
|
444 |
+
}
|
445 |
+
saveTasks();
|
446 |
+
renderTasks();
|
447 |
+
renderMergeStatus();
|
448 |
+
}
|
449 |
+
});
|
450 |
+
});
|
451 |
+
|
452 |
+
// Add event listeners for delete buttons
|
453 |
+
document.querySelectorAll('.delete-task').forEach(btn => {
|
454 |
+
btn.addEventListener('click', function() {
|
455 |
+
const taskId = parseInt(this.getAttribute('data-id'));
|
456 |
+
tasks = tasks.filter(task => task.id !== taskId);
|
457 |
+
saveTasks();
|
458 |
+
renderTasks();
|
459 |
+
renderMergeStatus();
|
460 |
+
});
|
461 |
+
});
|
462 |
+
|
463 |
+
// Add event listeners for edit buttons
|
464 |
+
document.querySelectorAll('.edit-task').forEach(btn => {
|
465 |
+
btn.addEventListener('click', function() {
|
466 |
+
const taskId = parseInt(this.getAttribute('data-id'));
|
467 |
+
const task = tasks.find(t => t.id === taskId);
|
468 |
+
if (task) {
|
469 |
+
currentEditingTaskId = taskId;
|
470 |
+
// Populate the form with task data
|
471 |
+
document.getElementById('taskType').value = task.type;
|
472 |
+
document.getElementById('taskTitle').value = task.title;
|
473 |
+
document.getElementById('branchName').value = task.branch;
|
474 |
+
document.getElementById('mergeCommands').value = task.commands || '';
|
475 |
+
|
476 |
+
// Render service tags
|
477 |
+
renderServiceTags(task.services);
|
478 |
+
|
479 |
+
// Show the modal
|
480 |
+
taskModal.classList.remove('hidden');
|
481 |
+
}
|
482 |
+
});
|
483 |
+
});
|
484 |
+
|
485 |
+
updateTaskCount();
|
486 |
+
}
|
487 |
+
|
488 |
+
// Render merge status
|
489 |
+
function renderMergeStatus() {
|
490 |
+
mergeStatusContainer.innerHTML = '';
|
491 |
+
|
492 |
+
tasks.forEach(task => {
|
493 |
+
const statusElement = document.createElement('div');
|
494 |
+
statusElement.className = 'bg-white border border-gray-200 rounded-lg p-4 shadow-sm card-hover transition-all';
|
495 |
+
|
496 |
+
statusElement.innerHTML = `
|
497 |
+
<div class="flex justify-between items-start mb-2">
|
498 |
+
<h3 class="font-semibold text-gray-800">${task.title}</h3>
|
499 |
+
<span class="branch-name text-xs font-mono bg-gray-100 px-2 py-1 rounded cursor-pointer hover:bg-gray-200" data-id="${task.id}">${task.branch}</span>
|
500 |
+
</div>
|
501 |
+
<div class="grid grid-cols-2 gap-4">
|
502 |
+
<div class="p-2 rounded text-center cursor-pointer status-dev" data-id="${task.id}">
|
503 |
+
<div class="text-xs font-medium text-gray-600 mb-1">DEV</div>
|
504 |
+
<span class="px-3 py-1 rounded-full text-xs font-medium status-${task.devStatus}">
|
505 |
+
${task.devStatus === 'pending' ? 'Pending' : 'Merged'}
|
506 |
+
</span>
|
507 |
+
</div>
|
508 |
+
<div class="p-2 rounded text-center cursor-pointer status-master" data-id="${task.id}">
|
509 |
+
<div class="text-xs font-medium text-gray-600 mb-1">MASTER</div>
|
510 |
+
<span class="px-3 py-1 rounded-full text-xs font-medium status-${task.masterStatus}">
|
511 |
+
${task.masterStatus === 'pending' ? 'Pending' : 'Merged'}
|
512 |
+
</span>
|
513 |
+
</div>
|
514 |
+
</div>
|
515 |
+
${task.services.length > 0 ? `
|
516 |
+
<div class="mt-3 pt-2 border-t border-gray-100">
|
517 |
+
<div class="text-xs font-medium text-gray-600 mb-1">Services:</div>
|
518 |
+
<div class="flex flex-wrap gap-1">
|
519 |
+
${task.services.map(service => `
|
520 |
+
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">${service}</span>
|
521 |
+
`).join('')}
|
522 |
+
</div>
|
523 |
+
</div>
|
524 |
+
` : ''}
|
525 |
+
`;
|
526 |
+
|
527 |
+
mergeStatusContainer.appendChild(statusElement);
|
528 |
+
});
|
529 |
+
|
530 |
+
// Add click handlers for status toggling
|
531 |
+
document.querySelectorAll('.status-dev').forEach(el => {
|
532 |
+
el.addEventListener('click', function() {
|
533 |
+
const taskId = parseInt(this.getAttribute('data-id'));
|
534 |
+
const task = tasks.find(t => t.id === taskId);
|
535 |
+
if (task) {
|
536 |
+
task.devStatus = task.devStatus === 'pending' ? 'merged' : 'pending';
|
537 |
+
saveTasks();
|
538 |
+
renderTasks();
|
539 |
+
renderMergeStatus();
|
540 |
+
}
|
541 |
+
});
|
542 |
+
});
|
543 |
+
|
544 |
+
document.querySelectorAll('.status-master').forEach(el => {
|
545 |
+
el.addEventListener('click', function() {
|
546 |
+
const taskId = parseInt(this.getAttribute('data-id'));
|
547 |
+
const task = tasks.find(t => t.id === taskId);
|
548 |
+
if (task) {
|
549 |
+
task.masterStatus = task.masterStatus === 'pending' ? 'merged' : 'pending';
|
550 |
+
saveTasks();
|
551 |
+
renderTasks();
|
552 |
+
renderMergeStatus();
|
553 |
+
}
|
554 |
+
});
|
555 |
+
});
|
556 |
+
}
|
557 |
+
|
558 |
+
// Initial render
|
559 |
+
renderTasks();
|
560 |
+
renderMergeStatus();
|
561 |
+
});
|
562 |
+
</script>
|
563 |
+
<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/tasksandbugs" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
564 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
ok this is really good but... i shuold be able to click on the branch name and toggle its status. also i should be able to type the name of services affected.
|