Timers: admin "Timer font" option with a monospace choice

A new Display-group select (Default / Monospace) sets the font for the
timer and LTC digits. Monospace keeps the numbers from shifting sideways
as they change — easier to read on a fast-moving countdown or timecode.
Flows through server state → client applies a `tm-mono` class and re-fits
the digit sizing; both timer and LTC values (.tm-time) honor it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Waters Church
2026-09-10 15:23:07 -04:00
co-authored by Claude Opus 4.8
parent 1d46657e06
commit 5fe39539fc
5 changed files with 33 additions and 4 deletions
+5 -2
View File
@@ -57,10 +57,11 @@ const { createLtcListener } = require('./ltc-listener');
/** Set by init(), read by the routes — both are rebuilt together on remount. */
let current = null;
function clearedState(enabled, ltcEnabled = false) {
function clearedState(enabled, ltcEnabled = false, timerFont = 'default') {
return {
enabled,
ltcEnabled,
timerFont,
reachable: false,
lastError: '',
timers: [],
@@ -86,8 +87,9 @@ module.exports = {
const ltcEnabled = Boolean(config.ltcEnabled);
const ltcDevice = String(config.ltcDevice || '');
const ltcChannel = Math.max(1, Math.trunc(Number(config.ltcChannel)) || 1);
const timerFont = config.timerFont === 'monospace' ? 'monospace' : 'default';
let latest = clearedState(enabled, ltcEnabled);
let latest = clearedState(enabled, ltcEnabled, timerFont);
let lastFrame = '';
let stopped = false;
let pollTimer = null;
@@ -207,6 +209,7 @@ module.exports = {
latest = {
enabled,
ltcEnabled,
timerFont,
reachable: latest.reachable,
lastError: latest.lastError,
timers: latest.timers,