codedash-app 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/frontend/app.js +28 -1
- package/src/frontend/styles.css +23 -37
package/package.json
CHANGED
package/src/frontend/app.js
CHANGED
|
@@ -209,19 +209,46 @@ async function pollActiveSessions() {
|
|
|
209
209
|
activeSessions[a.sessionId] = a;
|
|
210
210
|
}
|
|
211
211
|
});
|
|
212
|
-
// Update badges
|
|
212
|
+
// Update badges + animated border wrappers
|
|
213
213
|
document.querySelectorAll('.card').forEach(function(card) {
|
|
214
214
|
var id = card.getAttribute('data-id');
|
|
215
|
+
|
|
216
|
+
// Remove old badge
|
|
215
217
|
var existing = card.querySelector('.live-badge');
|
|
216
218
|
if (existing) existing.remove();
|
|
219
|
+
|
|
220
|
+
// Remove old wrapper if session no longer active
|
|
221
|
+
var parent = card.parentElement;
|
|
222
|
+
if (parent && parent.classList.contains('card-live-wrap') && !activeSessions[id]) {
|
|
223
|
+
parent.replaceWith(card);
|
|
224
|
+
card.style.border = '';
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
|
|
217
228
|
if (activeSessions[id]) {
|
|
218
229
|
var a = activeSessions[id];
|
|
230
|
+
|
|
231
|
+
// Add badge
|
|
219
232
|
var badge = document.createElement('span');
|
|
220
233
|
badge.className = 'live-badge live-' + a.status;
|
|
221
234
|
badge.textContent = a.status === 'waiting' ? 'WAITING' : 'LIVE';
|
|
222
235
|
badge.title = 'PID ' + a.pid + ' | CPU ' + a.cpu.toFixed(1) + '% | ' + a.memoryMB + 'MB';
|
|
223
236
|
var top = card.querySelector('.card-top');
|
|
224
237
|
if (top) top.insertBefore(badge, top.firstChild);
|
|
238
|
+
|
|
239
|
+
// Add animated border wrapper if not already wrapped
|
|
240
|
+
if (!parent || !parent.classList.contains('card-live-wrap')) {
|
|
241
|
+
var wrap = document.createElement('div');
|
|
242
|
+
wrap.className = 'card-live-wrap' + (a.status === 'waiting' ? ' live-waiting' : '');
|
|
243
|
+
wrap.style.setProperty('--live-color', a.status === 'waiting'
|
|
244
|
+
? 'rgba(251, 191, 36, 0.5)'
|
|
245
|
+
: 'rgba(74, 222, 128, 0.7)');
|
|
246
|
+
var borderDiv = document.createElement('div');
|
|
247
|
+
borderDiv.className = 'live-border';
|
|
248
|
+
card.parentNode.insertBefore(wrap, card);
|
|
249
|
+
wrap.appendChild(borderDiv);
|
|
250
|
+
wrap.appendChild(card);
|
|
251
|
+
}
|
|
225
252
|
}
|
|
226
253
|
});
|
|
227
254
|
} catch {}
|
package/src/frontend/styles.css
CHANGED
|
@@ -1437,50 +1437,41 @@ body {
|
|
|
1437
1437
|
50% { opacity: 0.3; transform: scale(0.6); }
|
|
1438
1438
|
}
|
|
1439
1439
|
|
|
1440
|
-
/* Animated border for live sessions */
|
|
1441
|
-
.card
|
|
1442
|
-
.card:has(.live-waiting) {
|
|
1443
|
-
border-color: transparent;
|
|
1440
|
+
/* Animated border wrapper for live sessions */
|
|
1441
|
+
.card-live-wrap {
|
|
1444
1442
|
position: relative;
|
|
1445
|
-
|
|
1443
|
+
border-radius: 12px;
|
|
1444
|
+
padding: 2px;
|
|
1446
1445
|
}
|
|
1447
1446
|
|
|
1448
|
-
.card
|
|
1449
|
-
|
|
1450
|
-
|
|
1447
|
+
.card-live-wrap > .card {
|
|
1448
|
+
border: none;
|
|
1449
|
+
position: relative;
|
|
1450
|
+
z-index: 1;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
.card-live-wrap .live-border {
|
|
1451
1454
|
position: absolute;
|
|
1452
|
-
inset:
|
|
1455
|
+
inset: 0;
|
|
1453
1456
|
border-radius: 12px;
|
|
1454
|
-
z-index:
|
|
1457
|
+
z-index: 0;
|
|
1455
1458
|
background: conic-gradient(
|
|
1456
1459
|
from var(--border-angle, 0deg),
|
|
1457
|
-
transparent
|
|
1458
|
-
var(--live-color) 50%,
|
|
1459
|
-
transparent
|
|
1460
|
+
transparent 35%,
|
|
1461
|
+
var(--live-color, rgba(74, 222, 128, 0.6)) 50%,
|
|
1462
|
+
transparent 65%
|
|
1460
1463
|
);
|
|
1461
1464
|
animation: border-spin 3s linear infinite;
|
|
1462
1465
|
}
|
|
1463
1466
|
|
|
1464
|
-
.card
|
|
1465
|
-
.card:has(.live-waiting)::after {
|
|
1466
|
-
content: '';
|
|
1467
|
-
position: absolute;
|
|
1468
|
-
inset: 1px;
|
|
1469
|
-
border-radius: 9px;
|
|
1470
|
-
background: var(--bg-card);
|
|
1471
|
-
z-index: -1;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
.card:has(.live-active) {
|
|
1475
|
-
--live-color: rgba(74, 222, 128, 0.6);
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
.card:has(.live-waiting) {
|
|
1479
|
-
--live-color: rgba(251, 191, 36, 0.4);
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
.card:has(.live-waiting)::before {
|
|
1467
|
+
.card-live-wrap.live-waiting .live-border {
|
|
1483
1468
|
animation: none;
|
|
1469
|
+
background: conic-gradient(
|
|
1470
|
+
from 90deg,
|
|
1471
|
+
transparent 35%,
|
|
1472
|
+
var(--live-color, rgba(251, 191, 36, 0.4)) 50%,
|
|
1473
|
+
transparent 65%
|
|
1474
|
+
);
|
|
1484
1475
|
}
|
|
1485
1476
|
|
|
1486
1477
|
@keyframes border-spin {
|
|
@@ -1493,11 +1484,6 @@ body {
|
|
|
1493
1484
|
inherits: false;
|
|
1494
1485
|
}
|
|
1495
1486
|
|
|
1496
|
-
[data-theme="light"] .card:has(.live-active)::after,
|
|
1497
|
-
[data-theme="light"] .card:has(.live-waiting)::after {
|
|
1498
|
-
background: #ffffff;
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
1487
|
/* ── Card expand preview ────────────────────────────────────── */
|
|
1502
1488
|
|
|
1503
1489
|
.card-expand-btn {
|