diff options
| author | Agando <roduccomm@gmail.com> | 2026-06-02 06:00:29 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-06-02 06:00:29 +0200 |
| commit | 6d41e590a38c73ef60f1c04beaf8f5438f350f46 (patch) | |
| tree | dc94aba0816e7bb87834cf518cbfe78d7a95f397 /modules/core/module-system.js | |
| parent | b839e58aa45da1945d0c46c8070b4e7016c59f94 (diff) | |
auto: 2026-06-02_06:00 changes
Diffstat (limited to 'modules/core/module-system.js')
| -rw-r--r-- | modules/core/module-system.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/core/module-system.js b/modules/core/module-system.js index beed699..e54a5fe 100644 --- a/modules/core/module-system.js +++ b/modules/core/module-system.js @@ -107,6 +107,26 @@ }; this.commands['health-check'] = () => this._healthCheck(); this.commands['memory-map-export'] = () => this._memoryMapExport(); + this.commands['font-size'] = (args) => { + if (!args.length || !args[0]) { + const cur = localStorage.getItem('webx11_font_size'); + this.terminal.print(`Current font-size: ${cur || '16'}px`, 'info'); + this.terminal.print('Usage: font-size <8-32>', 'info'); + return; + } + const val = parseInt(args[0], 10); + if (isNaN(val) || val < 8 || val > 32) { + this.terminal.print('font-size must be between 8 and 32', 'error'); + return; + } + localStorage.setItem('webx11_font_size', val.toString()); + // Apply directly to body — bypasses CSS inheritance issues + document.body.style.fontSize = val + 'px'; + document.getElementById('terminal-container').style.fontSize = val + 'px'; + document.getElementById('command-input').style.fontSize = val + 'px'; + this.terminal.print(`Font size set to ${val}px (saved) 👆`, 'success'); + }; + this.commands['setfont'] = this.commands['font-size']; } _autoRotateLogs(force = false) { try { |