Spaces:
Running
Running
why does it not move? - Follow Up Deployment
Browse files- index.html +67 -13
- prompts.txt +4 -1
index.html
CHANGED
|
@@ -306,6 +306,19 @@
|
|
| 306 |
|
| 307 |
<!-- Main Content -->
|
| 308 |
<div class="lg:col-span-3 space-y-6">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
<!-- Time Zone Converter -->
|
| 310 |
<div class="bg-white p-6 rounded-lg shadow">
|
| 311 |
<h2 class="text-xl font-semibold text-blue-500 mb-4">Appointment Time Converter</h2>
|
|
@@ -358,19 +371,6 @@
|
|
| 358 |
</div>
|
| 359 |
</div>
|
| 360 |
|
| 361 |
-
<!-- Pinned Scripts -->
|
| 362 |
-
<div class="bg-white p-6 rounded-lg shadow">
|
| 363 |
-
<div class="flex justify-between items-center mb-4">
|
| 364 |
-
<h2 class="text-xl font-semibold text-blue-500">Pinned Scripts</h2>
|
| 365 |
-
<button id="togglePinnedDatesBtn" class="toggle-dates-btn text-gray-500 hover:text-blue-500" title="Toggle dates">
|
| 366 |
-
<i class="fa-solid fa-eye-slash"></i>
|
| 367 |
-
</button>
|
| 368 |
-
</div>
|
| 369 |
-
<div id="pinnedScriptsContainer" class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 370 |
-
<!-- Pinned scripts will be rendered here -->
|
| 371 |
-
</div>
|
| 372 |
-
</div>
|
| 373 |
-
|
| 374 |
<!-- All Scripts -->
|
| 375 |
<div class="bg-white p-6 rounded-lg shadow">
|
| 376 |
<div class="import-export-container">
|
|
@@ -1369,6 +1369,12 @@
|
|
| 1369 |
<button onclick="copyScript(${script.id})" class="text-gray-400 hover:text-blue-500" title="Copy script">
|
| 1370 |
<i class="fas fa-copy"></i>
|
| 1371 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1372 |
<button onclick="togglePinScript(${script.id})" class="text-yellow-500 hover:text-yellow-600" title="Unpin">
|
| 1373 |
<i class="fas fa-star"></i>
|
| 1374 |
</button>
|
|
@@ -1552,6 +1558,52 @@
|
|
| 1552 |
scriptModal.classList.add('hidden');
|
| 1553 |
}
|
| 1554 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1555 |
// Show add label form
|
| 1556 |
function showAddLabelForm() {
|
| 1557 |
addLabelForm.classList.remove('hidden');
|
|
@@ -1653,6 +1705,8 @@
|
|
| 1653 |
|
| 1654 |
// Make functions available globally
|
| 1655 |
window.copyScript = copyScript;
|
|
|
|
|
|
|
| 1656 |
window.togglePinScript = togglePinScript;
|
| 1657 |
window.editScript = editScript;
|
| 1658 |
window.deleteScript = deleteScript;
|
|
|
|
| 306 |
|
| 307 |
<!-- Main Content -->
|
| 308 |
<div class="lg:col-span-3 space-y-6">
|
| 309 |
+
<!-- Pinned Scripts -->
|
| 310 |
+
<div class="bg-white p-6 rounded-lg shadow">
|
| 311 |
+
<div class="flex justify-between items-center mb-4">
|
| 312 |
+
<h2 class="text-xl font-semibold text-blue-500">Pinned Scripts</h2>
|
| 313 |
+
<button id="togglePinnedDatesBtn" class="toggle-dates-btn text-gray-500 hover:text-blue-500" title="Toggle dates">
|
| 314 |
+
<i class="fa-solid fa-eye-slash"></i>
|
| 315 |
+
</button>
|
| 316 |
+
</div>
|
| 317 |
+
<div id="pinnedScriptsContainer" class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 318 |
+
<!-- Pinned scripts will be rendered here -->
|
| 319 |
+
</div>
|
| 320 |
+
</div>
|
| 321 |
+
|
| 322 |
<!-- Time Zone Converter -->
|
| 323 |
<div class="bg-white p-6 rounded-lg shadow">
|
| 324 |
<h2 class="text-xl font-semibold text-blue-500 mb-4">Appointment Time Converter</h2>
|
|
|
|
| 371 |
</div>
|
| 372 |
</div>
|
| 373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 374 |
<!-- All Scripts -->
|
| 375 |
<div class="bg-white p-6 rounded-lg shadow">
|
| 376 |
<div class="import-export-container">
|
|
|
|
| 1369 |
<button onclick="copyScript(${script.id})" class="text-gray-400 hover:text-blue-500" title="Copy script">
|
| 1370 |
<i class="fas fa-copy"></i>
|
| 1371 |
</button>
|
| 1372 |
+
<button onclick="moveScriptUp(${script.id})" class="move-btn text-gray-500 hover:text-blue-500" title="Move up">
|
| 1373 |
+
<i class="fas fa-arrow-up text-xs"></i>
|
| 1374 |
+
</button>
|
| 1375 |
+
<button onclick="moveScriptDown(${script.id})" class="move-btn text-gray-500 hover:text-blue-500" title="Move down">
|
| 1376 |
+
<i class="fas fa-arrow-down text-xs"></i>
|
| 1377 |
+
</button>
|
| 1378 |
<button onclick="togglePinScript(${script.id})" class="text-yellow-500 hover:text-yellow-600" title="Unpin">
|
| 1379 |
<i class="fas fa-star"></i>
|
| 1380 |
</button>
|
|
|
|
| 1558 |
scriptModal.classList.add('hidden');
|
| 1559 |
}
|
| 1560 |
|
| 1561 |
+
// Move script up in pinned list
|
| 1562 |
+
function moveScriptUp(id) {
|
| 1563 |
+
const pinnedScripts = scripts.filter(script => script.pinned);
|
| 1564 |
+
const scriptIndex = pinnedScripts.findIndex(s => s.id === id);
|
| 1565 |
+
if (scriptIndex > 0) {
|
| 1566 |
+
// Find the actual indices in the main scripts array
|
| 1567 |
+
const scriptMainIndex = scripts.findIndex(s => s.id === id);
|
| 1568 |
+
const prevScriptId = pinnedScripts[scriptIndex - 1].id;
|
| 1569 |
+
const prevScriptMainIndex = scripts.findIndex(s => s.id === prevScriptId);
|
| 1570 |
+
|
| 1571 |
+
// Reorder directly in the scripts array
|
| 1572 |
+
[scripts[scriptMainIndex], scripts[prevScriptMainIndex]] =
|
| 1573 |
+
[scripts[prevScriptMainIndex], scripts[scriptMainIndex]];
|
| 1574 |
+
|
| 1575 |
+
// Update timestamps
|
| 1576 |
+
scripts[scriptMainIndex].updatedAt = new Date().toISOString();
|
| 1577 |
+
scripts[prevScriptMainIndex].updatedAt = new Date().toISOString();
|
| 1578 |
+
|
| 1579 |
+
saveData();
|
| 1580 |
+
renderPinnedScripts();
|
| 1581 |
+
}
|
| 1582 |
+
}
|
| 1583 |
+
|
| 1584 |
+
// Move script down in pinned list
|
| 1585 |
+
function moveScriptDown(id) {
|
| 1586 |
+
const pinnedScripts = scripts.filter(script => script.pinned);
|
| 1587 |
+
const scriptIndex = pinnedScripts.findIndex(s => s.id === id);
|
| 1588 |
+
if (scriptIndex < pinnedScripts.length - 1) {
|
| 1589 |
+
// Find the actual indices in the main scripts array
|
| 1590 |
+
const scriptMainIndex = scripts.findIndex(s => s.id === id);
|
| 1591 |
+
const nextScriptId = pinnedScripts[scriptIndex + 1].id;
|
| 1592 |
+
const nextScriptMainIndex = scripts.findIndex(s => s.id === nextScriptId);
|
| 1593 |
+
|
| 1594 |
+
// Reorder directly in the scripts array
|
| 1595 |
+
[scripts[scriptMainIndex], scripts[nextScriptMainIndex]] =
|
| 1596 |
+
[scripts[nextScriptMainIndex], scripts[scriptMainIndex]];
|
| 1597 |
+
|
| 1598 |
+
// Update timestamps
|
| 1599 |
+
scripts[scriptMainIndex].updatedAt = new Date().toISOString();
|
| 1600 |
+
scripts[nextScriptMainIndex].updatedAt = new Date().toISOString();
|
| 1601 |
+
|
| 1602 |
+
saveData();
|
| 1603 |
+
renderPinnedScripts();
|
| 1604 |
+
}
|
| 1605 |
+
}
|
| 1606 |
+
|
| 1607 |
// Show add label form
|
| 1608 |
function showAddLabelForm() {
|
| 1609 |
addLabelForm.classList.remove('hidden');
|
|
|
|
| 1705 |
|
| 1706 |
// Make functions available globally
|
| 1707 |
window.copyScript = copyScript;
|
| 1708 |
+
window.moveScriptUp = moveScriptUp;
|
| 1709 |
+
window.moveScriptDown = moveScriptDown;
|
| 1710 |
window.togglePinScript = togglePinScript;
|
| 1711 |
window.editScript = editScript;
|
| 1712 |
window.deleteScript = deleteScript;
|
prompts.txt
CHANGED
|
@@ -1 +1,4 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Allow me to change the order and move the pinned scripts. Keep same style
|
| 2 |
+
add a pinned scripts movement to move the scripts around
|
| 3 |
+
the arrows dont move the script. please fix
|
| 4 |
+
why does it not move?
|