shell-mirror 1.5.117 → 1.5.119
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/dashboard.css +80 -5
- package/public/app/dashboard.js +43 -13
package/package.json
CHANGED
package/public/app/dashboard.css
CHANGED
|
@@ -1035,20 +1035,95 @@ body {
|
|
|
1035
1035
|
.connection-status.disconnected { color: var(--warning); }
|
|
1036
1036
|
.connection-status.error { color: var(--danger); }
|
|
1037
1037
|
|
|
1038
|
-
/*
|
|
1038
|
+
/* Dashboard content wrapper */
|
|
1039
|
+
.dashboard-content-wrapper {
|
|
1040
|
+
display: contents;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
/* Usage Instructions - muted helper section (borderless, floating) */
|
|
1039
1044
|
.usage-instructions {
|
|
1040
1045
|
margin-top: 24px;
|
|
1041
|
-
|
|
1046
|
+
padding: 0 16px;
|
|
1042
1047
|
color: var(--text-muted);
|
|
1043
1048
|
font-size: 0.8rem;
|
|
1044
|
-
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.usage-step {
|
|
1052
|
+
display: flex;
|
|
1053
|
+
align-items: flex-start;
|
|
1054
|
+
gap: 12px;
|
|
1055
|
+
margin-bottom: 12px;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.usage-step-num {
|
|
1059
|
+
width: 20px;
|
|
1060
|
+
height: 20px;
|
|
1061
|
+
background: var(--bg-tertiary);
|
|
1062
|
+
color: var(--text-muted);
|
|
1063
|
+
border-radius: 50%;
|
|
1064
|
+
display: flex;
|
|
1065
|
+
align-items: center;
|
|
1066
|
+
justify-content: center;
|
|
1067
|
+
font-size: 0.7rem;
|
|
1068
|
+
font-weight: 600;
|
|
1069
|
+
flex-shrink: 0;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.usage-step-content {
|
|
1073
|
+
display: flex;
|
|
1074
|
+
flex-direction: column;
|
|
1075
|
+
gap: 4px;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.usage-step-title {
|
|
1079
|
+
color: var(--text-secondary);
|
|
1080
|
+
font-size: 0.8rem;
|
|
1045
1081
|
}
|
|
1046
1082
|
|
|
1047
1083
|
.usage-instructions code {
|
|
1048
1084
|
background: var(--bg-tertiary);
|
|
1049
|
-
padding:
|
|
1085
|
+
padding: 4px 8px;
|
|
1050
1086
|
border-radius: 4px;
|
|
1051
1087
|
font-family: 'Monaco', 'Menlo', monospace;
|
|
1052
1088
|
font-size: 0.75rem;
|
|
1053
|
-
color: var(--text-
|
|
1089
|
+
color: var(--text-muted);
|
|
1090
|
+
display: inline-block;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
.usage-note {
|
|
1094
|
+
color: var(--text-muted);
|
|
1095
|
+
font-size: 0.75rem;
|
|
1096
|
+
margin: 8px 0 16px 32px;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.usage-troubleshooting {
|
|
1100
|
+
margin-top: 16px;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.usage-trouble-title {
|
|
1104
|
+
color: var(--text-muted);
|
|
1105
|
+
font-size: 0.75rem;
|
|
1106
|
+
display: block;
|
|
1107
|
+
margin-bottom: 8px;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.usage-troubleshooting ul {
|
|
1111
|
+
list-style: none;
|
|
1112
|
+
margin: 0;
|
|
1113
|
+
padding: 0;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.usage-troubleshooting li {
|
|
1117
|
+
color: var(--text-muted);
|
|
1118
|
+
font-size: 0.75rem;
|
|
1119
|
+
padding: 3px 0;
|
|
1120
|
+
padding-left: 12px;
|
|
1121
|
+
position: relative;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
.usage-troubleshooting li::before {
|
|
1125
|
+
content: '•';
|
|
1126
|
+
position: absolute;
|
|
1127
|
+
left: 0;
|
|
1128
|
+
color: var(--text-muted);
|
|
1054
1129
|
}
|
package/public/app/dashboard.js
CHANGED
|
@@ -431,10 +431,16 @@ class ShellMirrorDashboard {
|
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
updateAgentsDisplay() {
|
|
434
|
-
const
|
|
435
|
-
if (
|
|
436
|
-
//
|
|
437
|
-
|
|
434
|
+
const wrapper = document.querySelector('.dashboard-content-wrapper');
|
|
435
|
+
if (wrapper) {
|
|
436
|
+
// Replace the entire wrapper to avoid duplication
|
|
437
|
+
wrapper.outerHTML = this.renderActiveAgents();
|
|
438
|
+
} else {
|
|
439
|
+
// Fallback for initial render
|
|
440
|
+
const agentsCard = document.querySelector('.dashboard-card');
|
|
441
|
+
if (agentsCard) {
|
|
442
|
+
agentsCard.outerHTML = this.renderActiveAgents();
|
|
443
|
+
}
|
|
438
444
|
}
|
|
439
445
|
}
|
|
440
446
|
|
|
@@ -663,18 +669,42 @@ class ShellMirrorDashboard {
|
|
|
663
669
|
}).join('');
|
|
664
670
|
|
|
665
671
|
return `
|
|
666
|
-
<div class="dashboard-
|
|
667
|
-
<div class="card
|
|
668
|
-
<
|
|
669
|
-
|
|
672
|
+
<div class="dashboard-content-wrapper">
|
|
673
|
+
<div class="dashboard-card">
|
|
674
|
+
<div class="card-header">
|
|
675
|
+
<h2>Agents</h2>
|
|
676
|
+
${agentCount > 0 ? `<span class="agent-count">${agentCount}</span>` : ''}
|
|
677
|
+
</div>
|
|
678
|
+
<div class="card-content">
|
|
679
|
+
${agentCount > 0 ? agentsHtml : this.renderEmptyAgentState()}
|
|
680
|
+
</div>
|
|
670
681
|
</div>
|
|
671
|
-
<div class="
|
|
672
|
-
|
|
682
|
+
<div class="usage-instructions">
|
|
683
|
+
<div class="usage-step">
|
|
684
|
+
<span class="usage-step-num">1</span>
|
|
685
|
+
<div class="usage-step-content">
|
|
686
|
+
<span class="usage-step-title">Install the agent</span>
|
|
687
|
+
<code>npm install -g shell-mirror</code>
|
|
688
|
+
</div>
|
|
689
|
+
</div>
|
|
690
|
+
<div class="usage-step">
|
|
691
|
+
<span class="usage-step-num">2</span>
|
|
692
|
+
<div class="usage-step-content">
|
|
693
|
+
<span class="usage-step-title">Run the agent</span>
|
|
694
|
+
<code>shell-mirror</code>
|
|
695
|
+
</div>
|
|
696
|
+
</div>
|
|
697
|
+
<p class="usage-note">The agent will automatically connect to your dashboard</p>
|
|
698
|
+
<div class="usage-troubleshooting">
|
|
699
|
+
<span class="usage-trouble-title">Troubleshooting</span>
|
|
700
|
+
<ul>
|
|
701
|
+
<li>Make sure you're logged in with the same Google account</li>
|
|
702
|
+
<li>Check that the agent is running in your terminal</li>
|
|
703
|
+
<li>Refresh this dashboard after starting the agent</li>
|
|
704
|
+
</ul>
|
|
705
|
+
</div>
|
|
673
706
|
</div>
|
|
674
707
|
</div>
|
|
675
|
-
<div class="usage-instructions">
|
|
676
|
-
<p>New here? Install with <code>npm install -g shell-mirror</code> then run <code>shell-mirror</code></p>
|
|
677
|
-
</div>
|
|
678
708
|
`;
|
|
679
709
|
}
|
|
680
710
|
|