@hmduc16031996/claude-mb-bridge 2.5.3 → 2.5.4
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 +34 -0
- 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
|
|
package/public/styles.css
CHANGED