shell-mirror 1.5.37 → 1.5.38
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
CHANGED
|
@@ -46,6 +46,13 @@
|
|
|
46
46
|
<p>Loading dashboard...</p>
|
|
47
47
|
</div>
|
|
48
48
|
|
|
49
|
+
<!-- Version Footer -->
|
|
50
|
+
<footer style="background: #ff6b35; color: white; text-align: center; padding: 10px 0; font-size: 0.8rem; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;">
|
|
51
|
+
<div style="max-width: 1200px; margin: 0 auto;">
|
|
52
|
+
<p id="dashboard-version-info">Shell Mirror Dashboard • Loading version...</p>
|
|
53
|
+
</div>
|
|
54
|
+
</footer>
|
|
55
|
+
|
|
49
56
|
<script src="dashboard.js"></script>
|
|
50
57
|
</body>
|
|
51
58
|
</html>
|
package/public/app/dashboard.js
CHANGED
|
@@ -10,6 +10,7 @@ class ShellMirrorDashboard {
|
|
|
10
10
|
|
|
11
11
|
async init() {
|
|
12
12
|
this.showLoading();
|
|
13
|
+
this.loadVersionInfo(); // Load version info immediately
|
|
13
14
|
|
|
14
15
|
try {
|
|
15
16
|
const authStatus = await this.checkAuthStatus();
|
|
@@ -109,7 +110,10 @@ class ShellMirrorDashboard {
|
|
|
109
110
|
`;
|
|
110
111
|
|
|
111
112
|
// Show centered login button
|
|
112
|
-
document.getElementById('login-button-overlay')
|
|
113
|
+
const loginOverlay = document.getElementById('login-button-overlay');
|
|
114
|
+
if (loginOverlay) {
|
|
115
|
+
loginOverlay.style.display = 'flex';
|
|
116
|
+
}
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
renderAuthenticatedDashboard() {
|
|
@@ -137,7 +141,10 @@ class ShellMirrorDashboard {
|
|
|
137
141
|
`;
|
|
138
142
|
|
|
139
143
|
// Hide login button overlay
|
|
140
|
-
document.getElementById('login-button-overlay')
|
|
144
|
+
const loginOverlay = document.getElementById('login-button-overlay');
|
|
145
|
+
if (loginOverlay) {
|
|
146
|
+
loginOverlay.style.display = 'none';
|
|
147
|
+
}
|
|
141
148
|
}
|
|
142
149
|
|
|
143
150
|
renderActiveAgents() {
|
|
@@ -317,6 +324,30 @@ class ShellMirrorDashboard {
|
|
|
317
324
|
}).format(date);
|
|
318
325
|
}
|
|
319
326
|
|
|
327
|
+
// Load version info for footer
|
|
328
|
+
async loadVersionInfo() {
|
|
329
|
+
try {
|
|
330
|
+
const response = await fetch('/build-info.json');
|
|
331
|
+
const buildInfo = await response.json();
|
|
332
|
+
const versionElement = document.getElementById('dashboard-version-info');
|
|
333
|
+
const footerElement = versionElement?.parentElement?.parentElement; // Get the footer element
|
|
334
|
+
|
|
335
|
+
if (versionElement && buildInfo) {
|
|
336
|
+
const buildDateTime = new Date(buildInfo.buildTime).toLocaleString();
|
|
337
|
+
versionElement.textContent = `Shell Mirror Dashboard v${buildInfo.version} • Built ${buildDateTime}`;
|
|
338
|
+
|
|
339
|
+
// Apply random footer color from build info
|
|
340
|
+
if (footerElement && buildInfo.footerColor) {
|
|
341
|
+
footerElement.style.background = buildInfo.footerColor;
|
|
342
|
+
console.log(`🎨 Applied footer color: ${buildInfo.footerColor}`);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
} catch (error) {
|
|
346
|
+
console.log('Could not load build info for dashboard:', error);
|
|
347
|
+
// Keep default version and color if build-info.json not available
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
320
351
|
// Action handlers
|
|
321
352
|
async connectToAgent(agentId) {
|
|
322
353
|
window.location.href = `/app/terminal.html?agent=${agentId}`;
|
package/public/app/terminal.js
CHANGED
|
@@ -79,8 +79,8 @@ async function loadVersionInfo() {
|
|
|
79
79
|
const footerElement = versionElement?.parentElement?.parentElement; // Get the footer element
|
|
80
80
|
|
|
81
81
|
if (versionElement && buildInfo) {
|
|
82
|
-
const
|
|
83
|
-
versionElement.textContent = `Terminal Mirror v${buildInfo.version} • Built ${
|
|
82
|
+
const buildDateTime = new Date(buildInfo.buildTime).toLocaleString();
|
|
83
|
+
versionElement.textContent = `Terminal Mirror v${buildInfo.version} • Built ${buildDateTime}`;
|
|
84
84
|
|
|
85
85
|
// Apply random footer color from build info
|
|
86
86
|
if (footerElement && buildInfo.footerColor) {
|