feat: significantly reduce terminal font sizes
- Reduce MIN_FONT_SIZE from 10 to 6 - Reduce MAX_FONT_SIZE from 24 to 20 - Reduce default desktop font size from 14 to 10 - Reduce default mobile font size from 16 to 12
This commit is contained in:
@@ -21,8 +21,8 @@ interface TerminalProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const FONT_SIZE_KEY = "terminal-font-size";
|
const FONT_SIZE_KEY = "terminal-font-size";
|
||||||
const MIN_FONT_SIZE = 10;
|
const MIN_FONT_SIZE = 6;
|
||||||
const MAX_FONT_SIZE = 24;
|
const MAX_FONT_SIZE = 20;
|
||||||
const RECONNECT_ATTEMPTS = 3;
|
const RECONNECT_ATTEMPTS = 3;
|
||||||
const RECONNECT_DELAY_BASE = 1000;
|
const RECONNECT_DELAY_BASE = 1000;
|
||||||
|
|
||||||
@@ -50,9 +50,9 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
|
|||||||
const activeModifierRef = useRef(activeModifier);
|
const activeModifierRef = useRef(activeModifier);
|
||||||
activeModifierRef.current = activeModifier;
|
activeModifierRef.current = activeModifier;
|
||||||
const [fontSize, setFontSize] = useState(() => {
|
const [fontSize, setFontSize] = useState(() => {
|
||||||
if (typeof window === "undefined") return isMobile ? 16 : 14;
|
if (typeof window === "undefined") return isMobile ? 12 : 10;
|
||||||
const stored = localStorage.getItem(FONT_SIZE_KEY);
|
const stored = localStorage.getItem(FONT_SIZE_KEY);
|
||||||
return stored ? parseInt(stored, 10) : isMobile ? 16 : 14;
|
return stored ? parseInt(stored, 10) : isMobile ? 12 : 10;
|
||||||
});
|
});
|
||||||
const lastPingRef = useRef<number>(0);
|
const lastPingRef = useRef<number>(0);
|
||||||
const heartbeatCheckRef = useRef<number | null>(null);
|
const heartbeatCheckRef = useRef<number | null>(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user