shell-mirror 1.5.77 → 1.5.78

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shell-mirror",
3
- "version": "1.5.77",
3
+ "version": "1.5.78",
4
4
  "description": "Access your Mac shell from any device securely. Perfect for mobile coding with Claude Code CLI, Gemini CLI, and any shell tool.",
5
5
  "main": "server.js",
6
6
  "bin": {
@@ -343,6 +343,88 @@
343
343
  from { opacity: 1; }
344
344
  to { opacity: 0.4; }
345
345
  }
346
+
347
+ /* Help Modal - Tab Navigation */
348
+ .help-tabs {
349
+ display: flex;
350
+ padding: 0 24px;
351
+ border-bottom: 1px solid #eee;
352
+ background: #f8f9fa;
353
+ }
354
+
355
+ .help-tab {
356
+ padding: 12px 20px;
357
+ background: transparent;
358
+ border: none;
359
+ border-bottom: 3px solid transparent;
360
+ cursor: pointer;
361
+ font-size: 0.9rem;
362
+ color: #666;
363
+ transition: all 0.2s ease;
364
+ }
365
+
366
+ .help-tab:hover {
367
+ color: #333;
368
+ background: rgba(102, 126, 234, 0.05);
369
+ }
370
+
371
+ .help-tab.active {
372
+ color: #667eea;
373
+ border-bottom-color: #667eea;
374
+ font-weight: 600;
375
+ }
376
+
377
+ /* Help Modal - Tab Content */
378
+ .help-tab-content {
379
+ display: none;
380
+ }
381
+
382
+ .help-tab-content.active {
383
+ display: block;
384
+ }
385
+
386
+ /* Help Modal - Content Sections */
387
+ .help-section {
388
+ margin-bottom: 24px;
389
+ }
390
+
391
+ .help-section h4 {
392
+ color: #333;
393
+ font-size: 1rem;
394
+ margin-bottom: 12px;
395
+ }
396
+
397
+ .help-section p {
398
+ color: #666;
399
+ line-height: 1.6;
400
+ margin-bottom: 8px;
401
+ }
402
+
403
+ .help-section ul {
404
+ list-style: none;
405
+ padding: 0;
406
+ margin: 8px 0;
407
+ }
408
+
409
+ .help-section li {
410
+ padding: 4px 0;
411
+ color: #666;
412
+ line-height: 1.6;
413
+ }
414
+
415
+ /* Help Modal - Mobile Responsiveness */
416
+ @media (max-width: 768px) {
417
+ .help-tabs {
418
+ overflow-x: auto;
419
+ -webkit-overflow-scrolling: touch;
420
+ }
421
+
422
+ .help-tab {
423
+ font-size: 0.8rem;
424
+ padding: 10px 12px;
425
+ white-space: nowrap;
426
+ }
427
+ }
346
428
  </style>
347
429
  </head>
348
430
  <body>
@@ -408,43 +490,64 @@
408
490
 
409
491
  <!-- Help Modal -->
410
492
  <div id="help-modal" style="display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.8); align-items: center; justify-content: center; z-index: 20000;">
411
- <div style="background: white; border-radius: 12px; max-width: 500px; width: 90%; max-height: 80vh; overflow: hidden;">
493
+ <div style="background: white; border-radius: 12px; max-width: 600px; width: 90%; max-height: 80vh; overflow: hidden;">
494
+ <!-- Header -->
412
495
  <div style="padding: 20px 24px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center;">
413
- <h3 style="margin: 0; font-size: 1.2rem; color: #333;">🚀 How to Use Shell Mirror</h3>
496
+ <h3 style="margin: 0; font-size: 1.2rem; color: #333;">🚀 Shell Mirror Terminal</h3>
414
497
  <button onclick="closeHelpModal()" style="background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #666;">×</button>
415
498
  </div>
499
+
500
+ <!-- Tab Navigation -->
501
+ <div class="help-tabs">
502
+ <button class="help-tab active" onclick="showHelpTab('sessions')">Sessions</button>
503
+ <button class="help-tab" onclick="showHelpTab('help')">Troubleshooting</button>
504
+ </div>
505
+
506
+ <!-- Tab Content -->
416
507
  <div style="padding: 24px; max-height: 60vh; overflow-y: auto;">
417
- <p style="margin-top: 0; margin-bottom: 24px; color: #666; font-size: 1rem;">Get started in 2 easy steps:</p>
418
-
419
- <div style="display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start;">
420
- <div style="flex-shrink: 0; width: 32px; height: 32px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.95rem;">1</div>
421
- <div style="flex: 1;">
422
- <h4 style="margin: 0 0 12px 0; font-size: 1.05rem; font-weight: 600; color: #333;">Install the agent</h4>
423
- <div style="background: #f8f9fa; border: 1px solid #e1e4e8; border-radius: 8px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px;">
424
- <code style="font-family: 'Monaco', 'Menlo', 'Courier New', monospace; font-size: 0.9rem; color: #1a1a1a; flex: 1;">npm install -g shell-mirror</code>
425
- <button onclick="copyToClipboard('npm install -g shell-mirror', this)" style="background: #667eea; color: white; border: none; border-radius: 6px; padding: 6px 12px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;">Copy</button>
426
- </div>
427
- </div>
428
- </div>
508
+ <!-- Sessions Tab -->
509
+ <div id="tab-sessions" class="help-tab-content active">
510
+ <p style="margin-top: 0; margin-bottom: 16px;">Sessions let you run multiple terminals simultaneously.</p>
511
+
512
+ <h4 style="margin-top: 20px; margin-bottom: 8px;">Creating</h4>
513
+ <ul style="list-style: none; padding: 0; margin: 0;">
514
+ <li>• Tap "Sessions" "+ New Session"</li>
515
+ <li>• Each session runs independently</li>
516
+ </ul>
429
517
 
430
- <div style="display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start;">
431
- <div style="flex-shrink: 0; width: 32px; height: 32px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.95rem;">2</div>
432
- <div style="flex: 1;">
433
- <h4 style="margin: 0 0 12px 0; font-size: 1.05rem; font-weight: 600; color: #333;">Run the agent</h4>
434
- <div style="background: #f8f9fa; border: 1px solid #e1e4e8; border-radius: 8px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px;">
435
- <code style="font-family: 'Monaco', 'Menlo', 'Courier New', monospace; font-size: 0.9rem; color: #1a1a1a; flex: 1;">shell-mirror</code>
436
- <button onclick="copyToClipboard('shell-mirror', this)" style="background: #667eea; color: white; border: none; border-radius: 6px; padding: 6px 12px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;">Copy</button>
437
- </div>
438
- <p style="margin: 8px 0 0 0; font-size: 0.85rem; color: #666; font-style: italic;">The agent will automatically connect to your dashboard</p>
439
- </div>
518
+ <h4 style="margin-top: 20px; margin-bottom: 8px;">Switching</h4>
519
+ <ul style="list-style: none; padding: 0; margin: 0;">
520
+ <li>• Tap "Sessions" dropdown</li>
521
+ <li>• Select any session</li>
522
+ <li>• Your processes keep running in background</li>
523
+ </ul>
524
+
525
+ <h4 style="margin-top: 20px; margin-bottom: 8px;">Limits</h4>
526
+ <ul style="list-style: none; padding: 0; margin: 0;">
527
+ <li>• Max 10 sessions per Mac</li>
528
+ <li>• Auto-deleted after 24h inactive</li>
529
+ </ul>
440
530
  </div>
441
531
 
442
- <div style="margin-top: 32px; padding: 16px; background: #f8f9fa; border-radius: 8px; border-left: 4px solid #667eea;">
443
- <h4 style="margin: 0 0 12px 0; font-size: 1rem; font-weight: 600; color: #333;">💡 Troubleshooting</h4>
444
- <ul style="margin: 0; padding-left: 20px; list-style-type: disc;">
445
- <li style="margin-bottom: 8px; color: #555; font-size: 0.9rem;">Make sure you're logged in with the same Google account</li>
446
- <li style="margin-bottom: 8px; color: #555; font-size: 0.9rem;">Check that the agent is running in your terminal</li>
447
- <li style="margin-bottom: 0; color: #555; font-size: 0.9rem;">Refresh your dashboard after starting the agent</li>
532
+ <!-- Troubleshooting Tab -->
533
+ <div id="tab-help" class="help-tab-content" style="display: none;">
534
+ <h4 style="margin-top: 0; margin-bottom: 8px;">Connection stuck?</h4>
535
+ <ul style="list-style: none; padding: 0; margin: 0 0 20px 0;">
536
+ <li>• Wait 10 seconds for auto-retry</li>
537
+ <li>• Still red? Return to Dashboard Reconnect</li>
538
+ </ul>
539
+
540
+ <h4 style="margin-top: 20px; margin-bottom: 8px;">Slow connection?</h4>
541
+ <ul style="list-style: none; padding: 0; margin: 0 0 20px 0;">
542
+ <li>• App tries: Local network → WebRTC → Fallback</li>
543
+ <li>• First connect may take 30 seconds</li>
544
+ <li>• WebRTC works best (100-500ms)</li>
545
+ </ul>
546
+
547
+ <h4 style="margin-top: 20px; margin-bottom: 8px;">Behind corporate firewall?</h4>
548
+ <ul style="list-style: none; padding: 0; margin: 0;">
549
+ <li>• May need IT to whitelist STUN servers</li>
550
+ <li>• Contact: stun.l.google.com port 19302</li>
448
551
  </ul>
449
552
  </div>
450
553
  </div>
@@ -463,16 +566,27 @@
463
566
  modal.style.display = 'none';
464
567
  }
465
568
 
466
- function copyToClipboard(text, button) {
467
- navigator.clipboard.writeText(text).then(() => {
468
- const originalText = button.textContent;
469
- button.textContent = 'Copied!';
470
- setTimeout(() => {
471
- button.textContent = originalText;
472
- }, 2000);
473
- }).catch(err => {
474
- console.error('Failed to copy:', err);
569
+ function showHelpTab(tabName) {
570
+ // Hide all tab content
571
+ document.querySelectorAll('.help-tab-content').forEach(content => {
572
+ content.classList.remove('active');
573
+ content.style.display = 'none';
574
+ });
575
+
576
+ // Remove active from all tab buttons
577
+ document.querySelectorAll('.help-tab').forEach(btn => {
578
+ btn.classList.remove('active');
475
579
  });
580
+
581
+ // Show selected tab content
582
+ const selectedContent = document.getElementById('tab-' + tabName);
583
+ if (selectedContent) {
584
+ selectedContent.classList.add('active');
585
+ selectedContent.style.display = 'block';
586
+ }
587
+
588
+ // Activate corresponding button
589
+ event.target.classList.add('active');
476
590
  }
477
591
 
478
592
  // Close modal when clicking outside