feat: apply settings effects — font size, grid columns, hidden sessions, sort order
- terminal.js createTerminal(): read fontSize from localStorage 'muxplex.display', default 14, apply Math.min(storedFontSize, 12) mobile cap - app.js renderGrid(): filter hidden sessions via _serverSettings.hidden_sessions, create visible array, apply alphabetical sort via localeCompare when sort_order is 'alphabetical'; 'recent'/'manual' use server-provided order - app.js renderSidebar(): apply same hidden sessions filter, use visible array - app.js DOMContentLoaded: call loadServerSettings() after startPolling() in restoreState().then() - tests: 13 new tests in test_frontend_js.py covering all spec requirements Co-authored-by: Amplifier <amplifier@example.com>
This commit is contained in:
@@ -140,11 +140,22 @@ function createTerminal() {
|
||||
_fitAddon = null;
|
||||
}
|
||||
|
||||
// Read font size from display settings (localStorage key 'muxplex.display')
|
||||
var storedFontSize = 14;
|
||||
try {
|
||||
var raw = localStorage.getItem('muxplex.display');
|
||||
if (raw) {
|
||||
var parsed = JSON.parse(raw);
|
||||
if (parsed && parsed.fontSize) storedFontSize = parsed.fontSize;
|
||||
}
|
||||
} catch (_) { /* use default 14 */ }
|
||||
|
||||
const mobile = window.innerWidth < 600;
|
||||
const fontSize = mobile ? Math.min(storedFontSize, 12) : storedFontSize;
|
||||
|
||||
_term = new window.Terminal({
|
||||
cursorBlink: true,
|
||||
fontSize: mobile ? 12 : 14,
|
||||
fontSize: fontSize,
|
||||
fontFamily: "'SF Mono', 'Fira Code', Consolas, monospace",
|
||||
theme: {
|
||||
background: '#000000',
|
||||
|
||||
Reference in New Issue
Block a user