@hmduc16031996/claude-mb-bridge 2.5.3 → 2.5.5
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.js +36 -2
- package/public/index.html +1 -1
- package/public/styles.css +2 -1
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -1724,6 +1724,40 @@ class ClaudeRemote {
|
|
|
1724
1724
|
|
|
1725
1725
|
// Always show in mobile flex flow
|
|
1726
1726
|
this.elements.mainScreen.classList.add('mobile-keys-visible');
|
|
1727
|
+
|
|
1728
|
+
// Handle initial sizing
|
|
1729
|
+
if (window.visualViewport) {
|
|
1730
|
+
window.visualViewport.addEventListener('resize', () => this.onViewportChange());
|
|
1731
|
+
window.visualViewport.addEventListener('scroll', () => this.onViewportChange());
|
|
1732
|
+
this.onViewportChange();
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
onViewportChange() {
|
|
1737
|
+
if (!window.visualViewport) return;
|
|
1738
|
+
|
|
1739
|
+
// Adjust app height to match visual viewport (the actual visible area above the keyboard)
|
|
1740
|
+
const viewportHeight = window.visualViewport.height;
|
|
1741
|
+
const bodyHeight = window.innerHeight;
|
|
1742
|
+
|
|
1743
|
+
// On some mobile browsers, setting 100% isn't enough when keyboard is open
|
|
1744
|
+
// We explicitly set the app height to the visual viewport height
|
|
1745
|
+
const app = document.getElementById('app');
|
|
1746
|
+
if (app) {
|
|
1747
|
+
app.style.height = `${viewportHeight}px`;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
// Recalculate terminal size for the new container height
|
|
1751
|
+
this.fitTerminal();
|
|
1752
|
+
|
|
1753
|
+
// Ensure terminal scrolled to bottom so cursor is visible above keyboard
|
|
1754
|
+
// Only if the current session is terminal-based
|
|
1755
|
+
if (this.currentSessionId && this.terminal) {
|
|
1756
|
+
this.terminal.scrollToBottom();
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
// Log for debugging visibility if needed
|
|
1760
|
+
// console.log(`Viewport height: ${viewportHeight}, Body height: ${bodyHeight}`);
|
|
1727
1761
|
}
|
|
1728
1762
|
|
|
1729
1763
|
|
|
@@ -1731,8 +1765,8 @@ class ClaudeRemote {
|
|
|
1731
1765
|
if (!this.ws || this.ws.readyState !== WebSocket.OPEN || !this.currentSessionId) return;
|
|
1732
1766
|
|
|
1733
1767
|
switch (key) {
|
|
1734
|
-
case '
|
|
1735
|
-
this.ws.send('\
|
|
1768
|
+
case 'enter':
|
|
1769
|
+
this.ws.send('\r'); // Enter (CR)
|
|
1736
1770
|
break;
|
|
1737
1771
|
case 'ctrl':
|
|
1738
1772
|
this.setCtrlActive(!this.ctrlActive);
|
package/public/index.html
CHANGED
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
|
|
133
133
|
<!-- Mobile Control Keys Toolbar (visible on mobile only) -->
|
|
134
134
|
<div id="mobile-keys" class="mobile-keys" role="toolbar" aria-label="Control keys">
|
|
135
|
-
<button type="button" class="mobile-key" data-key="
|
|
135
|
+
<button type="button" class="mobile-key" data-key="enter" aria-label="Enter">Ent</button>
|
|
136
136
|
<button type="button" class="mobile-key mobile-key-modifier" data-key="ctrl" aria-label="Control modifier" aria-pressed="false">Ctrl</button>
|
|
137
137
|
<button type="button" class="mobile-key mobile-key-modifier" data-key="shift" aria-label="Shift modifier" aria-pressed="false">Shift</button>
|
|
138
138
|
<button type="button" class="mobile-key" data-key="tab" aria-label="Tab">Tab</button>
|
package/public/styles.css
CHANGED