feat: add font size controls to mobile terminal header and fix auto-hide space reclamation

- TerminalComponent: expose changeFontSize via onTerminalReady callback
- MobileTerminalWrapper: pass changeFontSize to header
- MobileTerminalHeader: add A- and A+ font size buttons
- CSS: collapse header height/padding/margin/border when hidden to reclaim space
This commit is contained in:
Fusion
2026-05-24 13:10:07 +02:00
parent ec45283257
commit 4571bebf8e
4 changed files with 46 additions and 6 deletions
+10 -3
View File
@@ -15,7 +15,8 @@ interface TerminalProps {
onTerminalReady?: (
sendData: (data: string) => void,
connectionStatus: "connecting" | "connected" | "disconnected" | "error",
focusInput: () => void
focusInput: () => void,
changeFontSize: (delta: number) => void
) => void;
}
@@ -219,7 +220,10 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
const focusInput = () => {
termRef.current?.focus();
};
onTerminalReadyRef.current(sendData, status, focusInput);
const changeFontSize = (delta: number) => {
handleFontSizeChange(delta);
};
onTerminalReadyRef.current(sendData, status, focusInput, changeFontSize);
}
// Visibility API for reconnection
@@ -251,7 +255,10 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
const focusInput = () => {
termRef.current?.focus();
};
onTerminalReady(sendData, status, focusInput);
const changeFontSize = (delta: number) => {
handleFontSizeChange(delta);
};
onTerminalReady(sendData, status, focusInput, changeFontSize);
}
}, [status, onTerminalReady]);