shell-mirror 1.5.109 → 1.5.110
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/public/app/terminal.html +16 -4
- package/public/app/terminal.js +4 -1
package/package.json
CHANGED
package/public/app/terminal.html
CHANGED
|
@@ -510,10 +510,10 @@
|
|
|
510
510
|
|
|
511
511
|
<!-- Content -->
|
|
512
512
|
<div style="padding: 24px;">
|
|
513
|
-
<div style="display: flex; align-items: center; gap: 16px; margin-bottom: 20px;">
|
|
513
|
+
<div id="close-session-info" style="display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-left: 16px; border-left: 4px solid #888;">
|
|
514
514
|
<div style="font-size: 2.5rem;">🗑️</div>
|
|
515
515
|
<div>
|
|
516
|
-
<div id="close-session-name" style="font-size: 1.1rem;
|
|
516
|
+
<div id="close-session-name" style="font-size: 1.1rem; font-weight: 500; margin-bottom: 4px;">Session 1</div>
|
|
517
517
|
<div id="close-session-duration" style="font-size: 0.85rem; color: #888;">Duration: 5 minutes</div>
|
|
518
518
|
</div>
|
|
519
519
|
</div>
|
|
@@ -535,7 +535,7 @@
|
|
|
535
535
|
// Close Session Modal Functions
|
|
536
536
|
let pendingCloseSessionId = null;
|
|
537
537
|
|
|
538
|
-
function showCloseSessionModal(sessionId, sessionName, createdAt) {
|
|
538
|
+
function showCloseSessionModal(sessionId, sessionName, createdAt, sessionColor) {
|
|
539
539
|
pendingCloseSessionId = sessionId;
|
|
540
540
|
|
|
541
541
|
// Calculate duration
|
|
@@ -543,6 +543,18 @@
|
|
|
543
543
|
|
|
544
544
|
document.getElementById('close-session-name').textContent = sessionName || 'Session';
|
|
545
545
|
document.getElementById('close-session-duration').textContent = `Duration: ${duration}`;
|
|
546
|
+
|
|
547
|
+
// Apply session color to border and name
|
|
548
|
+
const infoDiv = document.getElementById('close-session-info');
|
|
549
|
+
const nameDiv = document.getElementById('close-session-name');
|
|
550
|
+
if (sessionColor) {
|
|
551
|
+
infoDiv.style.borderLeftColor = sessionColor.border;
|
|
552
|
+
nameDiv.style.color = sessionColor.border;
|
|
553
|
+
} else {
|
|
554
|
+
infoDiv.style.borderLeftColor = '#888';
|
|
555
|
+
nameDiv.style.color = '#fff';
|
|
556
|
+
}
|
|
557
|
+
|
|
546
558
|
document.getElementById('close-session-modal').style.display = 'flex';
|
|
547
559
|
}
|
|
548
560
|
|
|
@@ -572,6 +584,6 @@
|
|
|
572
584
|
}
|
|
573
585
|
</script>
|
|
574
586
|
|
|
575
|
-
<script src="/app/terminal.js?v=1.5.
|
|
587
|
+
<script src="/app/terminal.js?v=1.5.94"></script>
|
|
576
588
|
</body>
|
|
577
589
|
</html>
|
package/public/app/terminal.js
CHANGED
|
@@ -1061,9 +1061,12 @@ function closeSession(sessionId, event) {
|
|
|
1061
1061
|
const sessionName = session?.name || 'this session';
|
|
1062
1062
|
const createdAt = session?.createdAt || null;
|
|
1063
1063
|
|
|
1064
|
+
// Get session color for modal
|
|
1065
|
+
const sessionColor = getSessionColor(sessionId);
|
|
1066
|
+
|
|
1064
1067
|
// Show custom modal instead of browser confirm()
|
|
1065
1068
|
if (typeof showCloseSessionModal === 'function') {
|
|
1066
|
-
showCloseSessionModal(sessionId, sessionName, createdAt);
|
|
1069
|
+
showCloseSessionModal(sessionId, sessionName, createdAt, sessionColor);
|
|
1067
1070
|
} else {
|
|
1068
1071
|
// Fallback to native confirm if modal not available
|
|
1069
1072
|
if (confirm(`Close "${sessionName}"?\n\nThis will terminate the terminal session.`)) {
|